Explorar o código

Fixed get_or_create...test_savepoint_rollback test for Python3

The test was always skipped on Python3 because string literals are unicode
Shai Berger %!s(int64=12) %!d(string=hai) anos
pai
achega
36d47f72e3
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      tests/get_or_create/tests.py

+ 1 - 1
tests/get_or_create/tests.py

@@ -76,7 +76,7 @@ class GetOrCreateTests(TestCase):
                 warnings.simplefilter('ignore')
                 Person.objects.get_or_create(
                     birthday=date(1970, 1, 1),
-                    defaults={'first_name': "\xff", 'last_name': "\xff"})
+                    defaults={'first_name': b"\xff", 'last_name': b"\xff"})
         except (DatabaseError, DjangoUnicodeDecodeError):
             Person.objects.create(
                 first_name="Bob", last_name="Ross", birthday=date(1950, 1, 1))