Cement testing utilities.
A sub-class of unittest.TestCase.
Shorthand for ‘assert a == b, “%r != %r” % (a, b)’.
Create a generic app using TestApp. Arguments and Keyword Arguments are passed to the app.
Shorthand for assert.
Remove all registered hooks and handlers from the backend.
Sets up self.app with a generic TestApp(). Also resets the backend hooks and handlers so that everytime an app is created it is setup clean each time.
Basic CementApp for generic testing.
Test must raise one of expected exceptions to pass.
@raises(TypeError, ValueError) def test_raises_type_error(): raise TypeError("This test passes") @raises(Exception) def test_that_fails_by_passing(): pass
If you want to test many assertions about exceptions in a single test, you may want to use assert_raises instead.
Shorthand for assert. Saves 3 whole characters!
Shorthand for ‘assert a == b, “%r != %r” % (a, b)