From 4a7ce9e833cbb6344837491fdc98cd1752e7baf7 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Mon, 19 Jun 2017 22:36:08 -0700 Subject: [PATCH] Bake in the existing, but less than great hex sorting behavior --- tests/test_octodns_yaml.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_octodns_yaml.py b/tests/test_octodns_yaml.py index 9c3cec5..0f454b3 100644 --- a/tests/test_octodns_yaml.py +++ b/tests/test_octodns_yaml.py @@ -59,3 +59,12 @@ class TestYaml(TestCase): }, buf) self.assertEquals("---\n'*.1.1': 42\n'*.2.1': 44\n'*.11.1': 43\n", buf.getvalue()) + + # hex sorting isn't ideal, not treated as hex, this make sure we don't + # change the behavior + buf = StringIO() + safe_dump({ + '45a03129': 42, + '45a0392a': 43, + }, buf) + self.assertEquals("---\n45a0392a: 43\n45a03129: 42\n", buf.getvalue())