Trac-1.5.3/ 0000755 0001755 0001755 00000000000 14046065641 012151 5 ustar debacle debacle Trac-1.5.3/.gitignore 0000644 0001755 0001755 00000000377 14046065601 014144 0 ustar debacle debacle *~
.*.sw[op]
*.orig
.svn
.hg
build
dist
Trac.egg-info
*.py[co]
testenv
testing.log
functional-testing.log
trac/test.db
geckodriver.log
html
htmlcov
.coverage
Makefile.cfg
doc/.build
*.mo
trac/htdocs/js/messages/*.js
.idea
.project
.pydevproject
.settings
Trac-1.5.3/trac/ 0000755 0001755 0001755 00000000000 14046065641 013102 5 ustar debacle debacle Trac-1.5.3/trac/prefs/ 0000755 0001755 0001755 00000000000 14046065641 014221 5 ustar debacle debacle Trac-1.5.3/trac/prefs/tests/ 0000755 0001755 0001755 00000000000 14046065641 015363 5 ustar debacle debacle Trac-1.5.3/trac/prefs/tests/__init__.py 0000644 0001755 0001755 00000001426 14046065601 017473 0 ustar debacle debacle # -*- coding: utf-8 -*-
#
# Copyright (C) 2008-2021 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://trac.edgewall.org/wiki/TracLicense.
#
# This software consists of voluntary contributions made by many
# individuals. For the exact contribution history, see the revision
# history and logs, available at https://trac.edgewall.org/log/.
import unittest
from trac.prefs.tests import web_ui
from trac.prefs.tests.functional import functionalSuite
def test_suite():
suite = unittest.TestSuite()
suite.addTest(web_ui.test_suite())
return suite
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
Trac-1.5.3/trac/prefs/tests/functional.py 0000755 0001755 0001755 00000025341 14046065601 020103 0 ustar debacle debacle #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008-2021 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://trac.edgewall.org/wiki/TracLicense.
#
# This software consists of voluntary contributions made by many
# individuals. For the exact contribution history, see the revision
# history and logs, available at https://trac.edgewall.org/log/.
import re
import unittest
from trac.tests.functional import FunctionalTestCaseSetup, \
internal_error, tc
#TODO: split this into multiple smaller testcases
class TestPreferences(FunctionalTestCaseSetup):
def runTest(self):
"""Set preferences for admin user"""
self._tester.go_to_preferences()
try:
tc.notfind('Your preferences have been saved.')
tc.formvalue('userprefs', 'name', ' System Administrator ')
tc.formvalue('userprefs', 'email', ' admin@example.com ')
tc.submit()
tc.find('Your preferences have been saved.')
self._tester.go_to_preferences("Localization")
tc.formvalue('userprefs', 'tz', 'GMT -10:00')
tc.submit()
tc.find('Your preferences have been saved.')
self._tester.go_to_preferences()
tc.notfind('Your preferences have been saved.')
tc.find('value="System Administrator"')
tc.find(r'value="admin@example\.com"')
self._tester.go_to_preferences("Localization")
tc.find('GMT -10:00')
finally:
self._tester.go_to_preferences()
tc.formvalue('userprefs', 'name', '')
tc.formvalue('userprefs', 'email', '')
tc.submit()
tc.find('Your preferences have been saved.')
class TestDefaultHandler(FunctionalTestCaseSetup):
def runTest(self):
"""Set default handler."""
# Project default_handler is selected.
self._tester.go_to_preferences("User Interface")
tc.notfind(r'