summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorjortel <devnull@localhost>2010-03-11 21:24:20 +0000
committerjortel <devnull@localhost>2010-03-11 21:24:20 +0000
commit4123470f3cfd1e6ff3e07214f08e9fdf7c0258c3 (patch)
treeceaddc08301e8837e7993ec3c24fbe4f0f97c078 /tests
parentc51561c339bcf56e2039c51d7db9457e8d76eb7c (diff)
downloadsuds-4123470f3cfd1e6ff3e07214f08e9fdf7c0258c3.tar.gz
Fix Timezone.local references; Change xsd.sxbasic.qualify() to use the schema tns when the document default namespace is not specified (None, None). This handles poorly written wsdl/schema files that contain unqualified references such as: base='Animal' but don't define a default namespace for the schema document. The expectation here (although incorrect) is that the schema tns be used.
Diffstat (limited to 'tests')
-rw-r--r--tests/builtin.py56
1 files changed, 28 insertions, 28 deletions
diff --git a/tests/builtin.py b/tests/builtin.py
index c8f6c6f..ca6c2e6 100644
--- a/tests/builtin.py
+++ b/tests/builtin.py
@@ -51,7 +51,7 @@ class DateTest(TestCase):
self.equalsTimezone(6)
def testUtcTimezone(self):
- Timezone.local = 0
+ Timezone.LOCAL = 0
ref = dt.date(1941, 12, 7)
s = '%.4d-%.2d-%.2dZ' % (ref.year, ref.month, ref.day)
xdate = Date()
@@ -59,7 +59,7 @@ class DateTest(TestCase):
self.assertEqual(d, ref)
def equalsTimezone(self, tz):
- Timezone.local = tz
+ Timezone.LOCAL = tz
ref = dt.date(1941, 12, 7)
s = '%.4d-%.2d-%.2d%+.2d:00' % (ref.year, ref.month, ref.day, tz)
xdate = Date()
@@ -105,7 +105,7 @@ class TimeTest(TestCase):
self.equalsTimezone(-6)
def testUtcTimezone(self):
- Timezone.local = 0
+ Timezone.LOCAL = 0
ref = dt.time(10, 30, 22)
s = '%.2d:%.2d:%.2dZ' % (ref.hour, ref.minute, ref.second)
xtime = Time()
@@ -113,7 +113,7 @@ class TimeTest(TestCase):
self.assertEqual(t, ref)
def equalsTimezone(self, tz):
- Timezone.local = tz
+ Timezone.LOCAL = tz
ref = dt.time(10, 30, 22)
s = self.strTime(ref.hour, ref.minute, ref.second, tz)
xtime = Time()
@@ -121,7 +121,7 @@ class TimeTest(TestCase):
self.assertEqual(t, ref)
def testConvertNegativeToGreaterNegative(self):
- Timezone.local = -6
+ Timezone.LOCAL = -6
ref = dt.time(10, 30, 22)
s = self.strTime(ref.hour, ref.minute, ref.second, -5)
xtime = Time()
@@ -131,7 +131,7 @@ class TimeTest(TestCase):
self.assertEqual(ref.second, t.second)
def testConvertNegativeToLesserNegative(self):
- Timezone.local = -5
+ Timezone.LOCAL = -5
ref = dt.time(10, 30, 22)
s = self.strTime(ref.hour, ref.minute, ref.second, -6)
xtime = Time()
@@ -141,7 +141,7 @@ class TimeTest(TestCase):
self.assertEqual(ref.second, t.second)
def testConvertPositiveToGreaterPositive(self):
- Timezone.local = 3
+ Timezone.LOCAL = 3
ref = dt.time(10, 30, 22)
s = self.strTime(ref.hour, ref.minute, ref.second, 2)
xtime = Time()
@@ -151,7 +151,7 @@ class TimeTest(TestCase):
self.assertEqual(ref.second, t.second)
def testConvertPositiveToLesserPositive(self):
- Timezone.local = 2
+ Timezone.LOCAL = 2
ref = dt.time(10, 30, 22)
s = self.strTime(ref.hour, ref.minute, ref.second, 3)
xtime = Time()
@@ -161,7 +161,7 @@ class TimeTest(TestCase):
self.assertEqual(ref.second, t.second)
def testConvertPositiveToNegative(self):
- Timezone.local = -6
+ Timezone.LOCAL = -6
ref = dt.time(10, 30, 22)
s = self.strTime(ref.hour, ref.minute, ref.second, 3)
xtime = Time()
@@ -171,7 +171,7 @@ class TimeTest(TestCase):
self.assertEqual(ref.second, t.second)
def testConvertNegativeToPositive(self):
- Timezone.local = 3
+ Timezone.LOCAL = 3
ref = dt.time(10, 30, 22)
s = self.strTime(ref.hour, ref.minute, ref.second, -6)
xtime = Time()
@@ -181,7 +181,7 @@ class TimeTest(TestCase):
self.assertEqual(ref.second, t.second)
def testConvertNegativeToUtc(self):
- Timezone.local = 0
+ Timezone.LOCAL = 0
ref = dt.time(10, 30, 22)
s = self.strTime(ref.hour, ref.minute, ref.second, -6)
xtime = Time()
@@ -191,7 +191,7 @@ class TimeTest(TestCase):
self.assertEqual(ref.second, t.second)
def testConvertPositiveToUtc(self):
- Timezone.local = 0
+ Timezone.LOCAL = 0
ref = dt.time(10, 30, 22)
s = self.strTime(ref.hour, ref.minute, ref.second, 3)
xtime = Time()
@@ -201,7 +201,7 @@ class TimeTest(TestCase):
self.assertEqual(ref.second, t.second)
def testConvertUtcToPositive(self):
- Timezone.local = 3
+ Timezone.LOCAL = 3
ref = dt.time(10, 30, 22)
s = '%.2d:%.2d:%.2dZ' % (ref.hour, ref.minute, ref.second)
xtime = Time()
@@ -211,7 +211,7 @@ class TimeTest(TestCase):
self.assertEqual(ref.second, t.second)
def testConvertUtcToNegative(self):
- Timezone.local = -6
+ Timezone.LOCAL = -6
ref = dt.time(10, 30, 22)
s = '%.2d:%.2d:%.2dZ' % (ref.hour, ref.minute, ref.second)
xtime = Time()
@@ -273,7 +273,7 @@ class DateTimeTest(TestCase):
self.equalsTimezone(-6)
def testUtcTimezone(self):
- Timezone.local = 0
+ Timezone.LOCAL = 0
ref = dt.datetime(1941, 12, 7, 10, 30, 22)
s = '%.4d-%.2d-%.2dT%.2d:%.2d:%.2d' \
% (ref.year,
@@ -287,7 +287,7 @@ class DateTimeTest(TestCase):
self.assertEqual(t, ref)
def equalsTimezone(self, tz):
- Timezone.local = tz
+ Timezone.LOCAL = tz
ref = dt.datetime(1941, 12, 7, 10, 30, 22)
s = self.strDateTime(
ref.year,
@@ -302,7 +302,7 @@ class DateTimeTest(TestCase):
self.assertEqual(t, ref)
def testConvertNegativeToGreaterNegative(self):
- Timezone.local = -6
+ Timezone.LOCAL = -6
ref = dt.datetime(1941, 12, 7, 10, 30, 22)
s = self.strDateTime(
ref.year,
@@ -322,7 +322,7 @@ class DateTimeTest(TestCase):
self.assertEqual(ref.second, t.second)
def testConvertNegativeToLesserNegative(self):
- Timezone.local = -5
+ Timezone.LOCAL = -5
ref = dt.datetime(1941, 12, 7, 10, 30, 22)
s = self.strDateTime(
ref.year,
@@ -342,7 +342,7 @@ class DateTimeTest(TestCase):
self.assertEqual(ref.second, t.second)
def testConvertPositiveToGreaterPositive(self):
- Timezone.local = 3
+ Timezone.LOCAL = 3
ref = dt.datetime(1941, 12, 7, 10, 30, 22)
s = self.strDateTime(
ref.year,
@@ -362,7 +362,7 @@ class DateTimeTest(TestCase):
self.assertEqual(ref.second, t.second)
def testConvertPositiveToLesserPositive(self):
- Timezone.local = 2
+ Timezone.LOCAL = 2
ref = dt.datetime(1941, 12, 7, 10, 30, 22)
s = self.strDateTime(
ref.year,
@@ -382,7 +382,7 @@ class DateTimeTest(TestCase):
self.assertEqual(ref.second, t.second)
def testConvertPositiveToNegative(self):
- Timezone.local = -6
+ Timezone.LOCAL = -6
ref = dt.datetime(1941, 12, 7, 10, 30, 22)
s = self.strDateTime(
ref.year,
@@ -402,7 +402,7 @@ class DateTimeTest(TestCase):
self.assertEqual(ref.second, t.second)
def testConvertNegativeToPositive(self):
- Timezone.local = 3
+ Timezone.LOCAL = 3
ref = dt.datetime(1941, 12, 7, 10, 30, 22)
s = self.strDateTime(
ref.year,
@@ -422,7 +422,7 @@ class DateTimeTest(TestCase):
self.assertEqual(ref.second, t.second)
def testConvertNegativeToUtc(self):
- Timezone.local = 0
+ Timezone.LOCAL = 0
ref = dt.datetime(1941, 12, 7, 10, 30, 22)
s = self.strDateTime(
ref.year,
@@ -442,7 +442,7 @@ class DateTimeTest(TestCase):
self.assertEqual(ref.second, t.second)
def testConvertPositiveToUtc(self):
- Timezone.local = 0
+ Timezone.LOCAL = 0
ref = dt.datetime(1941, 12, 7, 10, 30, 22)
s = self.strDateTime(
ref.year,
@@ -462,7 +462,7 @@ class DateTimeTest(TestCase):
self.assertEqual(ref.second, t.second)
def testConvertUtcToPositive(self):
- Timezone.local = 3
+ Timezone.LOCAL = 3
ref = dt.datetime(1941, 12, 7, 10, 30, 22)
s = '%.4d-%.2d-%.2dT%.2d:%.2d:%.2dZ' \
% (ref.year,
@@ -481,7 +481,7 @@ class DateTimeTest(TestCase):
self.assertEqual(ref.second, t.second)
def testConvertUtcToNegative(self):
- Timezone.local = -6
+ Timezone.LOCAL = -6
ref = dt.datetime(1941, 12, 7, 10, 30, 22)
s = '%.4d-%.2d-%.2dT%.2d:%.2d:%.2dZ' \
% (ref.year,
@@ -500,7 +500,7 @@ class DateTimeTest(TestCase):
self.assertEqual(ref.second, t.second)
def testConvertNegativeToGreaterNegativeAndPreviousDay(self):
- Timezone.local = -6
+ Timezone.LOCAL = -6
ref = dt.datetime(1941, 12, 7, 0, 30, 22)
s = self.strDateTime(
ref.year,
@@ -520,7 +520,7 @@ class DateTimeTest(TestCase):
self.assertEqual(ref.second, t.second)
def testConvertNegativeToLesserNegativeAndNextDay(self):
- Timezone.local = -5
+ Timezone.LOCAL = -5
ref = dt.datetime(1941, 12, 7, 23, 30, 22)
s = self.strDateTime(
ref.year,