Cheetah.Tests.Regressions module¶
-
class
Cheetah.Tests.Regressions.
CustomGetAttrClass
¶ Bases:
object
-
exception
Cheetah.Tests.Regressions.
GetAttrException
¶ Bases:
exceptions.Exception
-
class
Cheetah.Tests.Regressions.
GetAttrTest
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Test for an issue occurring when __getatttr__() raises an exception causing NameMapper to raise a NotFound exception
-
test_NotFoundException
()¶
-
test_ValidException
()¶
-
-
class
Cheetah.Tests.Regressions.
InlineImportTest
(methodName='runTest')¶ Bases:
unittest.case.TestCase
-
test_AutoImporting
()¶
-
test_FromFooImportThing
()¶ - Verify that a bug introduced in v2.1.0 where an inline:
- #from module import class
- would result in the following code being generated:
- import class
-
test_ImportFailModule
()¶
-
test_ProperImportOfBadModule
()¶
-
test_StuffBeforeImport_Legacy
()¶
-
-
class
Cheetah.Tests.Regressions.
Mantis_Issue_11_Regression_Test
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Test case for bug outlined in Mantis issue #11:
Output: Traceback (most recent call last):
- File “test.py”, line 12, in <module>
- t.respond()
File “DynamicallyCompiledCheetahTemplate.py”, line 86, in respond File “/usr/lib64/python2.6/cgi.py”, line 1035, in escape
s = s.replace(”&”, “&”) # Must be done first!-
test_FailingBehavior
()¶
-
test_FailingBehaviorWithSetting
()¶
-
class
Cheetah.Tests.Regressions.
Mantis_Issue_21_Regression_Test
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Test case for bug outlined in issue #21
Effectively @staticmethod and @classmethod decorated methods in templates don’t properly define the _filter local, which breaks when using the NameMapper
-
runTest
()¶
-
-
class
Cheetah.Tests.Regressions.
Mantis_Issue_22_Regression_Test
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Test case for bug outlined in issue #22
When using @staticmethod and @classmethod in conjunction with the #filter directive the generated code for the #filter is reliant on the self local, breaking the function
-
test_DefinedFilter
()¶
-
test_NoneFilter
()¶
-