Fixed Python 2.6 support in test code
parent
56444b0f65
commit
44d79b5a19
|
|
@ -813,9 +813,9 @@ def qrepr(data):
|
||||||
return repr(data)
|
return repr(data)
|
||||||
elif django.VERSION >= (1, 10):
|
elif django.VERSION >= (1, 10):
|
||||||
# Django 1.11 still shows "<QuerySet [", not taking the actual type into account.
|
# Django 1.11 still shows "<QuerySet [", not taking the actual type into account.
|
||||||
return '<{} {}'.format(data.__class__.__name__, repr(data)[10:])
|
return '<{0} {1}'.format(data.__class__.__name__, repr(data)[10:])
|
||||||
else:
|
else:
|
||||||
# Simulate Django 1.11 behavior for older Django versions.
|
# Simulate Django 1.11 behavior for older Django versions.
|
||||||
return '<{} {}>'.format(data.__class__.__name__, repr(data))
|
return '<{0} {1}>'.format(data.__class__.__name__, repr(data))
|
||||||
|
|
||||||
return repr(data)
|
return repr(data)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue