/tests/modeltests/test_client/tests.py

https://code.google.com/p/mango-py/ · Python · 20 lines · 10 code · 5 blank · 5 comment · 0 complexity · 17f507341cec7713b8efa18ceb1f15a1 MD5 · raw file

  1. # Validate that you can override the default test suite
  2. from django.utils import unittest
  3. def suite():
  4. """
  5. Define a suite that deliberately ignores a test defined in
  6. this module.
  7. """
  8. testSuite = unittest.TestSuite()
  9. testSuite.addTest(SampleTests('testGoodStuff'))
  10. return testSuite
  11. class SampleTests(unittest.TestCase):
  12. def testGoodStuff(self):
  13. pass
  14. def testBadStuff(self):
  15. self.fail("This test shouldn't run")