diff options
| author | Marc Tamlyn <marc.tamlyn@gmail.com> | 2014-05-22 15:05:19 +0100 |
|---|---|---|
| committer | Marc Tamlyn <marc.tamlyn@gmail.com> | 2014-05-22 15:05:19 +0100 |
| commit | 635acf42c53e77e1ab0fd61e248730d99501c5c1 (patch) | |
| tree | a1df415a9428ff8f478b0777b0759c28cd8b102a /tests/postgres_tests | |
| parent | 48348782e65438829147d0d066276d1caa0d485b (diff) | |
Fix a test dependent on json ordering.
Diffstat (limited to 'tests/postgres_tests')
| -rw-r--r-- | tests/postgres_tests/test_array.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/postgres_tests/test_array.py b/tests/postgres_tests/test_array.py index 35ea65480a..b8ae48c5bc 100644 --- a/tests/postgres_tests/test_array.py +++ b/tests/postgres_tests/test_array.py @@ -1,3 +1,4 @@ +import json import unittest from django.contrib.postgres.fields import ArrayField @@ -226,7 +227,7 @@ class TestSerialization(TestCase): def test_dumping(self): instance = IntegerArrayModel(field=[1, 2]) data = serializers.serialize('json', [instance]) - self.assertEqual(data, self.test_data) + self.assertEqual(json.loads(data), json.loads(self.test_data)) def test_loading(self): instance = list(serializers.deserialize('json', self.test_data))[0].object |
