aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2017-07-13 10:25:56 +0200
committerIlya Etingof <etingof@gmail.com>2017-07-13 10:26:23 +0200
commit5f0f1e87a412909dde80d6d063b87b3dfb7c30fa (patch)
treeff9677f642e573c8427b0b8d9ab580a64fec939c /tests
parent023e9fb6765cb002e07af105273e4f048e6673e9 (diff)
downloadpyasn1-5f0f1e87a412909dde80d6d063b87b3dfb7c30fa.tar.gz
WIP: time objects / datetime adapter implemented
Diffstat (limited to 'tests')
-rw-r--r--tests/type/test_useful.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/type/test_useful.py b/tests/type/test_useful.py
index 7b01637..d416459 100644
--- a/tests/type/test_useful.py
+++ b/tests/type/test_useful.py
@@ -40,10 +40,10 @@ class ObjectDescriptorTestCase(unittest.TestCase):
class GeneralizedTimeTestCase(unittest.TestCase):
def testFromDateTime(self):
- assert useful.GeneralizedTime.fromDateTime(datetime.datetime(2017, 07, 11, 0, 1, 2, 3, tzinfo=UTC)) == '2017071100010203,4+0000'
+ assert useful.GeneralizedTime.fromDateTime(datetime.datetime(2017, 07, 11, 0, 1, 2, 30000, tzinfo=UTC)) == '20170711000102.3Z'
def testToDateTime(self):
- assert datetime.datetime(2017, 07, 11, 0, 1, 2, 3, tzinfo=UTC) == useful.GeneralizedTime('2017071100010203,4+0000')
+ assert datetime.datetime(2017, 07, 11, 0, 1, 2, 30000, tzinfo=UTC) == useful.GeneralizedTime('20170711000102.3Z').asDateTime
class UTCTimeTestCase(unittest.TestCase):