parts/django/tests/modeltests/test_client/tests.py
changeset 69 c6bca38c1cbf
equal deleted inserted replaced
68:5ff1fc726848 69:c6bca38c1cbf
       
     1 # Validate that you can override the default test suite
       
     2 
       
     3 import unittest
       
     4 
       
     5 def suite():
       
     6     """
       
     7     Define a suite that deliberately ignores a test defined in
       
     8     this module.
       
     9     """
       
    10     
       
    11     testSuite = unittest.TestSuite()
       
    12     testSuite.addTest(SampleTests('testGoodStuff'))
       
    13     return testSuite
       
    14     
       
    15 class SampleTests(unittest.TestCase):
       
    16     def testGoodStuff(self):
       
    17         pass
       
    18         
       
    19     def testBadStuff(self):
       
    20         self.fail("This test shouldn't run")