diff options
author | Ilya Etingof <etingof@gmail.com> | 2017-09-26 23:30:22 +0200 |
---|---|---|
committer | Ilya Etingof <etingof@gmail.com> | 2017-09-26 23:32:17 +0200 |
commit | abac677958b0e83948f1d0d80cde28ad8a8c696b (patch) | |
tree | cd3a35e36d895c188262c615a9036b497113720d /tests | |
parent | ce4b16a2c0baa7fb8fbcec1854568ae656d27878 (diff) | |
download | pyasn1-abac677958b0e83948f1d0d80cde28ad8a8c696b.tar.gz |
fixed ASN.1 time types deepcopy/pickle operations
Diffstat (limited to 'tests')
-rw-r--r-- | tests/type/test_useful.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/type/test_useful.py b/tests/type/test_useful.py index 717eede..82a97d7 100644 --- a/tests/type/test_useful.py +++ b/tests/type/test_useful.py @@ -6,6 +6,7 @@ # import sys import datetime +from copy import deepcopy try: import unittest2 as unittest @@ -72,6 +73,10 @@ class GeneralizedTimeTestCase(BaseTestCase): def testToDateTime8(self): assert datetime.datetime(2017, 7, 11, 0) == useful.GeneralizedTime('2017071100').asDateTime + def testCopy(self): + dt = useful.GeneralizedTime("20170916234254+0130").asDateTime + assert dt == deepcopy(dt) + class UTCTimeTestCase(BaseTestCase): |