From 977d588dc26623026945a7e4ab4dbdd78869c521 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Tue, 12 Oct 2010 01:59:28 +0000 Subject: [PATCH] Converted initial_sql_regress tests from doctests (sort of...) to unittests. We have always been at war with doctests. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14179 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/initial_sql_regress/models.py | 2 -- tests/regressiontests/initial_sql_regress/tests.py | 8 ++++++++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 tests/regressiontests/initial_sql_regress/tests.py diff --git a/tests/regressiontests/initial_sql_regress/models.py b/tests/regressiontests/initial_sql_regress/models.py index 7cf725991a..9f91802ec7 100644 --- a/tests/regressiontests/initial_sql_regress/models.py +++ b/tests/regressiontests/initial_sql_regress/models.py @@ -7,7 +7,5 @@ from django.db import models class Simple(models.Model): name = models.CharField(max_length = 50) -__test__ = {'API_TESTS':""} - # NOTE: The format of the included SQL file for this test suite is important. # It must end with a trailing newline in order to test the fix for #2161. diff --git a/tests/regressiontests/initial_sql_regress/tests.py b/tests/regressiontests/initial_sql_regress/tests.py new file mode 100644 index 0000000000..2b3ca91f91 --- /dev/null +++ b/tests/regressiontests/initial_sql_regress/tests.py @@ -0,0 +1,8 @@ +from django.test import TestCase + +from models import Simple + + +class InitialSQLTests(TestCase): + def test_initial_sql(self): + self.assertEqual(Simple.objects.count(), 7)