Ticket #17364: testing.txt.diff

File testing.txt.diff, 1.3 KB (added by Annie (movielady) <movielady@…>, 12 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):
    124124            self.assertEqual(self.lion.speak(), 'The lion says "roar"')
    125125            self.assertEqual(self.cat.speak(), 'The cat says "meow"')
    126126
     
    288288method inside a test case, add the name of the test method to the
    289289label::
    290290
    291     $ ./manage.py test animals.AnimalTestCase.testFluffyAnimals
     291    $ ./manage.py test animals.AnimalTestCase.test_animals_can_speak
    292292
    293293.. versionadded:: 1.2
    294294   The ability to select individual doctests was added.
Back to Top