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".
5 Replace these with more appropriate tests for your application.
7 from __future__ import unicode_literals
9 from django.test import TestCase
11 class SimpleTest(TestCase):
12 def test_basic_addition(self):
14 Tests that 1 + 1 always equals 2.
16 self.failUnlessEqual(1 + 1, 2)
18 __test__ = {"doctest": """
19 Another way to test that 1 + 1 is equal to 2.
26 from unittest import TestSuite, defaultTestLoader
28 suite.addTests(defaultTestLoader.loadTestsFromTestCase(SimpleTest))
31 if __name__ == "__main__":
32 from unittest import main
33 main(defaultTest="suite")