From fa966900e164c2a0cfaede20708a28bbf998bf76 Mon Sep 17 00:00:00 2001 From: Dima Spivak Date: Sat, 2 Sep 2017 11:37:53 -0700 Subject: [PATCH] Fix MayaInterval.iso8601() --- maya/core.py | 2 +- tests/test_maya_interval.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/maya/core.py b/maya/core.py index a7db620..ae12523 100644 --- a/maya/core.py +++ b/maya/core.py @@ -352,7 +352,7 @@ class MayaInterval(object): def iso8601(self): """Returns an ISO 8601 representation of the MayaInterval.""" - return '{0}/{1}'.format(self.start.iso6801, self.end.iso8601) + return '{0}/{1}'.format(self.start.iso8601(), self.end.iso8601()) @classmethod def from_iso8601(cls, s): diff --git a/tests/test_maya_interval.py b/tests/test_maya_interval.py index dcaf3b0..6325ef5 100755 --- a/tests/test_maya_interval.py +++ b/tests/test_maya_interval.py @@ -582,3 +582,9 @@ def test_interval_from_datetime(): ) assert interval3.start == start assert interval3.end == end + + +def test_interval_iso8601(): + start = maya.when('11-17-11 08:09:10') + interval = maya.MayaInterval(start=start, duration=1) + assert interval.iso8601() == '2011-11-17T08:09:10Z/2011-11-17T08:09:11Z'