summaryrefslogtreecommitdiff
path: root/tests/regressiontests/initial_sql_regress
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2010-10-12 01:59:46 +0000
committerAlex Gaynor <alex.gaynor@gmail.com>2010-10-12 01:59:46 +0000
commit9ab383b394c70ebb550536f3b7ba91a5cfc3b912 (patch)
tree8bc5e379e71a15d2d03d74065cc3bd20937f6365 /tests/regressiontests/initial_sql_regress
parentde8ff6b672fcf0010a4584d98cc845eb2ab8fc6c (diff)
[1.2.X] Converted initial_sql_regress tests from doctests (sort of...) to unittests. We have always been at war with doctests. Backport of [14179].
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/initial_sql_regress')
-rw-r--r--tests/regressiontests/initial_sql_regress/models.py2
-rw-r--r--tests/regressiontests/initial_sql_regress/tests.py8
2 files changed, 8 insertions, 2 deletions
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)