Split RFC3339 test

This commit is contained in:
Timo Furrer
2018-05-15 09:13:01 +02:00
parent 62a6283200
commit f09d6eec63
+3 -1
View File
@@ -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