summaryrefslogtreecommitdiff
path: root/tests/backends/tests.py
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@oscaro.com>2014-06-05 17:06:50 +0200
committerAymeric Augustin <aymeric.augustin@oscaro.com>2014-06-05 17:10:42 +0200
commit2e4bcb9b0265ceb0ef0eae6da2a91f89d037d05f (patch)
tree1e44e0d7f55a02fec610153a2ca2bb50eb84a563 /tests/backends/tests.py
parent4fb50a9a82a15134a72c4c77fe57e641002b7340 (diff)
Avoided using BinaryField unecessarily in tests.
Several database backends struggle with binary data. This change minimizes the risk of unrelated tests failures when binary fields trigger errors.
Diffstat (limited to 'tests/backends/tests.py')
-rw-r--r--tests/backends/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/backends/tests.py b/tests/backends/tests.py
index 46b991e496..90ae8a98c0 100644
--- a/tests/backends/tests.py
+++ b/tests/backends/tests.py
@@ -334,9 +334,9 @@ class LastExecutedQueryTest(TestCase):
"""
Test that last_executed_query() returns an Unicode string
"""
- persons = models.Reporter.objects.filter(raw_data=b'\x00\x46 \xFE').extra(select={'föö': 1})
- sql, params = persons.query.sql_with_params()
- cursor = persons.query.get_compiler('default').execute_sql(CURSOR)
+ data = models.RawData.objects.filter(raw_data=b'\x00\x46 \xFE').extra(select={'föö': 1})
+ sql, params = data.query.sql_with_params()
+ cursor = data.query.get_compiler('default').execute_sql(CURSOR)
last_sql = cursor.db.ops.last_executed_query(cursor, sql, params)
self.assertIsInstance(last_sql, six.text_type)