tests.py 654 B

12345678910111213141516171819202122232425
  1. """
  2. This file demonstrates writing tests using the unittest module. These will pass
  3. when you run "manage.py test".
  4. Replace this with more appropriate tests for your application.
  5. """
  6. import django
  7. from django.test import TestCase
  8. # TODO: Configure your database in settings.py and sync before running tests.
  9. class SimpleTest(TestCase):
  10. """Tests for the application views."""
  11. # Django requires an explicit setup() when running tests in PTVS
  12. @classmethod
  13. def setUpClass(cls):
  14. django.setup()
  15. def test_basic_addition(self):
  16. """
  17. Tests that 1 + 1 always equals 2.
  18. """
  19. self.assertEqual(1 + 1, 2)