From 048228c0b68885a98a9c9bf7be0334d06c6d378f Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Wed, 31 Aug 2016 22:50:21 +0200 Subject: [PATCH] prevent dict ordering from breaking tests --- tests/test_main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_main.py b/tests/test_main.py index 73e6fbd..1a83733 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -532,8 +532,12 @@ class MainTestCase(utils.TestCase): log_output = u("\n").join([u(' ').join(x) for x in logs.actual()]) expected = "WakaTime ERROR {'response_code': 500, 'response_content': u'fake content'}" + if log_output[-2] == '0': + expected = "WakaTime ERROR {'response_content': u'fake content', 'response_code': 500}" if is_py3: expected = "WakaTime ERROR {'response_code': 500, 'response_content': 'fake content'}" + if log_output[-2] == '0': + expected = "WakaTime ERROR {'response_content': 'fake content', 'response_code': 500}" self.assertEquals(expected, log_output) self.patched['wakatime.session_cache.SessionCache.delete'].assert_called_once_with()