Ticket #17364: testing.txt.2.diff

File testing.txt.2.diff, 1.3 KB (added by movielady <movielady@…>, 13 years ago)
  • docs/topics/testing.txt

     
    8585    :mod:`django.utils.unittest` module alias. If you are using Python
    8686    2.7, or you have installed unittest2 locally, Django will map the
    8787    alias to the installed version of the unittest library. Otherwise,
    88     Django will use it's own bundled version of unittest2.
     88    Django will use its own bundled version of unittest2.
    8989
    9090    To use this alias, simply use::
    9191
     
    120120            self.lion = Animal.objects.create(name="lion", sound="roar")
    121121            self.cat = Animal.objects.create(name="cat", sound="meow")
    122122
    123         def testSpeaking(self):
     123        def test_animals_can_speak(self):
     124            """Animals that can speak are correctly identified"""
    124125            self.assertEqual(self.lion.speak(), 'The lion says "roar"')
    125126            self.assertEqual(self.cat.speak(), 'The cat says "meow"')
    126127
     
    288289method inside a test case, add the name of the test method to the
    289290label::
    290291
    291     $ ./manage.py test animals.AnimalTestCase.testFluffyAnimals
     292    $ ./manage.py test animals.AnimalTestCase.test_animals_can_speak
    292293
    293294.. versionadded:: 1.2
    294295   The ability to select individual doctests was added.
Back to Top