Switched to different datetime formatting in JSON.

We now use the same format as the Pillar API.
This commit is contained in:
2016-11-07 10:55:49 +01:00
parent fe2c36328a
commit ea33d69a8e
2 changed files with 4 additions and 2 deletions

View File

@@ -68,7 +68,7 @@ class PillarUtilsTests(unittest.TestCase):
resource['datetime'] = datetime.datetime(2016, 3, 22, 12, 35, 16)
as_json = json.dumps(resource, cls=utils.PillarJSONEncoder, sort_keys=True)
self.assertEqual('{"datetime": "2016-03-22 12:35:16"}', as_json)
self.assertEqual('{"datetime": "Tue, 22 Mar 2016 12:35:16 GMT"}', as_json)
def test_sanitize_filename(self):