summaryrefslogtreecommitdiff
path: root/tests/get_or_create
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2013-07-29 19:19:04 +0200
committerClaude Paroz <claude@2xlibre.net>2013-07-29 20:28:13 +0200
commit5c1143910e071c73671424036408c4548742d24f (patch)
tree20c67bd23a8590657cd28699f17c1a52bda2cebf /tests/get_or_create
parent402b4a7a20a4f00fce0f01cdc3f5f97967fdb935 (diff)
downloaddjango-5c1143910e071c73671424036408c4548742d24f.tar.gz
Removed most of absolute_import imports
Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
Diffstat (limited to 'tests/get_or_create')
-rw-r--r--tests/get_or_create/tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/get_or_create/tests.py b/tests/get_or_create/tests.py
index 0f766ab128..a612ea60a0 100644
--- a/tests/get_or_create/tests.py
+++ b/tests/get_or_create/tests.py
@@ -1,4 +1,4 @@
-from __future__ import absolute_import
+from __future__ import unicode_literals
from datetime import date
import traceback
@@ -65,7 +65,7 @@ class GetOrCreateTests(TestCase):
ManualPrimaryKeyTest.objects.get_or_create(id=1, data="Different")
except IntegrityError as e:
formatted_traceback = traceback.format_exc()
- self.assertIn('obj.save', formatted_traceback)
+ self.assertIn(str('obj.save'), formatted_traceback)
def test_savepoint_rollback(self):
# Regression test for #20463: the database connection should still be