1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

[1.8.x] Fixed mistakes in tests unveiled by version bump to 1.8.1.

This commit is contained in:
Tim Graham
2015-04-01 19:15:27 -04:00
parent b0512db5c4
commit e7366ab1f9
3 changed files with 14 additions and 13 deletions

View File

@@ -6,7 +6,7 @@ import warnings
from django.test import TestCase
from django.utils.encoding import force_text
from django.utils.version import get_major_version, get_version
from django.utils.version import get_version
from .models import Container, Event, Group, Happening, M2MModel
@@ -141,7 +141,8 @@ class PickleabilityTestCase(TestCase):
with warnings.catch_warnings(record=True) as recorded:
pickle.loads(pickle.dumps(qs))
msg = force_text(recorded.pop().message)
self.assertEqual(msg,
"Pickled queryset instance's Django version %s does not "
"match the current version %s."
% (str(float(get_major_version()) - 0.1), get_version()))
self.assertEqual(
msg,
"Pickled queryset instance's Django version 1.0 does not "
"match the current version %s." % get_version()
)