/src/danseku/news/tests.py

https://bitbucket.org/danseku/danseku · Python · 23 lines · 14 code · 4 blank · 5 comment · 0 complexity · 1fde9e174e80f7680d95dc905a3533a3 MD5 · raw file

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