summaryrefslogtreecommitdiff
path: root/tests/regressiontests/initial_sql_regress
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2012-12-18 09:02:07 +0000
committerAndrew Godwin <andrew@aeracode.org>2012-12-18 09:02:07 +0000
commitb62e82365ad56ca930f7abb1d1dbdf9ce5a7c7c3 (patch)
tree76bce44f4c7ee6172dcf116be6e4a26e380ef20a /tests/regressiontests/initial_sql_regress
parent6a632e04578776e877adc5e2dc53f008c890a0d4 (diff)
parentc64b57d16688025b2d48668d5c4cb9eda7484612 (diff)
Merge remote-tracking branch 'core/master' into schema-alteration
Conflicts: django/db/models/loading.py django/db/models/options.py
Diffstat (limited to 'tests/regressiontests/initial_sql_regress')
-rw-r--r--tests/regressiontests/initial_sql_regress/sql/simple.sql3
-rw-r--r--tests/regressiontests/initial_sql_regress/tests.py7
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/regressiontests/initial_sql_regress/sql/simple.sql b/tests/regressiontests/initial_sql_regress/sql/simple.sql
index 39363baa9a..d82f8381af 100644
--- a/tests/regressiontests/initial_sql_regress/sql/simple.sql
+++ b/tests/regressiontests/initial_sql_regress/sql/simple.sql
@@ -2,7 +2,8 @@
INSERT INTO initial_sql_regress_simple (name) VALUES ('John'); -- another comment
INSERT INTO initial_sql_regress_simple (name) VALUES ('-- Comment Man');
INSERT INTO initial_sql_regress_simple (name) VALUES ('Paul');
-INSERT INTO initial_sql_regress_simple (name) VALUES ('Ringo');
+INSERT INTO
+ initial_sql_regress_simple (name) VALUES ('Ringo');
INSERT INTO initial_sql_regress_simple (name) VALUES ('George');
INSERT INTO initial_sql_regress_simple (name) VALUES ('Miles O''Brien');
INSERT INTO initial_sql_regress_simple (name) VALUES ('Semicolon;Man');
diff --git a/tests/regressiontests/initial_sql_regress/tests.py b/tests/regressiontests/initial_sql_regress/tests.py
index 03a91cb807..39d8921061 100644
--- a/tests/regressiontests/initial_sql_regress/tests.py
+++ b/tests/regressiontests/initial_sql_regress/tests.py
@@ -1,3 +1,6 @@
+from django.core.management.color import no_style
+from django.core.management.sql import custom_sql_for_model
+from django.db import connections, DEFAULT_DB_ALIAS
from django.test import TestCase
from .models import Simple
@@ -15,10 +18,6 @@ class InitialSQLTests(TestCase):
self.assertEqual(Simple.objects.count(), 0)
def test_custom_sql(self):
- from django.core.management.sql import custom_sql_for_model
- from django.core.management.color import no_style
- from django.db import connections, DEFAULT_DB_ALIAS
-
# Simulate the custom SQL loading by syncdb
connection = connections[DEFAULT_DB_ALIAS]
custom_sql = custom_sql_for_model(Simple, no_style(), connection)