From f09d6eec63297afc43fa2ac31fd4b5839a3a58ed Mon Sep 17 00:00:00 2001 From: Timo Furrer Date: Tue, 15 May 2018 09:13:01 +0200 Subject: [PATCH] Split RFC3339 test --- tests/test_maya.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_maya.py b/tests/test_maya.py index 8082c02..8afef65 100644 --- a/tests/test_maya.py +++ b/tests/test_maya.py @@ -239,12 +239,14 @@ def test_datetime_to_timezone(): assert dt.tzinfo.zone == 'US/Eastern' -def test_rfc3339(): +def test_rfc3339_epoch(): mdt = maya.when('2016-01-01') out = mdt.rfc3339() mdt2 = maya.MayaDT.from_rfc3339(out) assert mdt.epoch == mdt2.epoch + +def test_rfc3339_format(): rfc3339 = maya.MayaDT.rfc3339(maya.when('2016-01-01T12:03:03Z')) # it's important that the string has got a "max 1-digit millis" fragment # as per https://tools.ietf.org/html/rfc3339#section-5.6