您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

tests.py 514B

1234567891011121314151617181920212223
  1. """
  2. This file demonstrates two different styles of tests (one doctest and one
  3. unittest). These will both pass when you run "manage.py test".
  4. Replace these with more appropriate tests for your application.
  5. """
  6. from django.test import TestCase
  7. class SimpleTest(TestCase):
  8. def test_basic_addition(self):
  9. """
  10. Tests that 1 + 1 always equals 2.
  11. """
  12. self.failUnlessEqual(1 + 1, 2)
  13. __test__ = {"doctest": """
  14. Another way to test that 1 + 1 is equal to 2.
  15. >>> 1 + 1 == 2
  16. True
  17. """}