You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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. """}