Fixed #24558 -- Made dumpdata mapping ordering deterministic.

Thanks to gfairchild for the report and Claude for the review.
This commit is contained in:
Simon Charette 2015-04-01 15:42:09 -04:00
parent 147ac85613
commit 5bc3123479
6 changed files with 69 additions and 17 deletions

View file

@ -594,7 +594,7 @@ class SerializationTests(TestCase):
def assert_yaml_contains_datetime(self, yaml, dt):
# Depending on the yaml dumper, '!timestamp' might be absent
six.assertRegex(self, yaml,
r"- fields: {dt: !(!timestamp)? '%s'}" % re.escape(dt))
r"\n fields: {dt: !(!timestamp)? '%s'}" % re.escape(dt))
def test_naive_datetime(self):
dt = datetime.datetime(2011, 9, 1, 13, 20, 30)