summaryrefslogtreecommitdiff
path: root/tests/builtin.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/builtin.py')
-rw-r--r--tests/builtin.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/builtin.py b/tests/builtin.py
index 8ebcf78..31ca3c3 100644
--- a/tests/builtin.py
+++ b/tests/builtin.py
@@ -14,10 +14,14 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# written by: Jeff Ortel ( jortel@redhat.com )
-
+import sys
+sys.path.append('../')
from suds.sax.date import Timezone as Tz
from suds.xsd.sxbuiltin import *
from unittest import TestCase
+from tests import *
+
+setup_logging()
class Date(XDate):
@@ -234,6 +238,19 @@ class DateTimeTest(TestCase):
t = xdt.translate(s)
self.assertEqual(t, ref)
+ def testOverflow(self):
+ ref = dt.datetime(1, 1, 1, 0, 0, 0)
+ s = '%.4d-%.2d-%.2dT%.2d:%.2d:%.2dZ' \
+ % (ref.year,
+ ref.month,
+ ref.day,
+ ref.hour,
+ ref.minute,
+ ref.second)
+ xdt = DateTime()
+ t = xdt.translate(s)
+ self.assertEqual(t, ref)
+
def testSimpleWithMicrosecond(self):
ref = dt.datetime(1941, 12, 7, 10, 30, 22, 454)
s = '%.4d-%.2d-%.2dT%.2d:%.2d:%.2d.%.4d' \