summaryrefslogtreecommitdiff
path: root/tests/introspection
diff options
context:
space:
mode:
authorDražen Odobašić <dodobas@candela-it.com>2015-09-11 19:33:12 -0400
committerTim Graham <timograham@gmail.com>2015-09-12 11:40:50 -0400
commitb1e33ceceda1e75ff68c7deed8f6659683a195d3 (patch)
treee4e446f69194f2dc3c9c7ee3ecf48290ea8d4d31 /tests/introspection
parent84b0a8d2aad042fb573df5055b6153770d0929ac (diff)
downloaddjango-b1e33ceceda1e75ff68c7deed8f6659683a195d3.tar.gz
Fixed #23395 -- Limited line lengths to 119 characters.
Diffstat (limited to 'tests/introspection')
-rw-r--r--tests/introspection/tests.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/introspection/tests.py b/tests/introspection/tests.py
index df0072ad92..3cd00060db 100644
--- a/tests/introspection/tests.py
+++ b/tests/introspection/tests.py
@@ -138,9 +138,13 @@ class IntrospectionTests(TransactionTestCase):
def test_get_relations_alt_format(self):
"""With SQLite, foreign keys can be added with different syntaxes."""
with connection.cursor() as cursor:
- cursor.fetchone = mock.Mock(return_value=[
- "CREATE TABLE track(id, art_id INTEGER, FOREIGN KEY(art_id) REFERENCES %s(id));" % Article._meta.db_table
- ])
+ cursor.fetchone = mock.Mock(
+ return_value=[
+ "CREATE TABLE track(id, art_id INTEGER, FOREIGN KEY(art_id) REFERENCES {}(id));".format(
+ Article._meta.db_table
+ )
+ ]
+ )
relations = connection.introspection.get_relations(cursor, 'mocked_table')
self.assertEqual(relations, {'art_id': ('id', Article._meta.db_table)})