PageRenderTime 23ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/tests/regressiontests/initial_sql_regress/tests.py

https://code.google.com/p/mango-py/
Python | 15 lines | 5 code | 4 blank | 6 comment | 0 complexity | c3ce74764a0615befedfeeddf781052f MD5 | raw file
Possible License(s): BSD-3-Clause
  1. from django.test import TestCase
  2. from models import Simple
  3. class InitialSQLTests(TestCase):
  4. def test_initial_sql(self):
  5. # The format of the included SQL file for this test suite is important.
  6. # It must end with a trailing newline in order to test the fix for #2161.
  7. # However, as pointed out by #14661, test data loaded by custom SQL
  8. # can't be relied upon; as a result, the test framework flushes the
  9. # data contents before every test. This test validates that this has
  10. # occurred.
  11. self.assertEqual(Simple.objects.count(), 0)