diff options
Diffstat (limited to 'tests/test_gsxws.py')
-rw-r--r-- | tests/test_gsxws.py | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/test_gsxws.py b/tests/test_gsxws.py index 3cb1e06..5571c22 100644 --- a/tests/test_gsxws.py +++ b/tests/test_gsxws.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- import logging -from datetime import date from os import environ as env +from datetime import date, datetime from unittest import main, skip, TestCase @@ -29,6 +29,24 @@ class TestCoreFunctions(TestCase): self.assertRegexpMatches(rep.dumps(), '<GsxObject><blaa>ääöö</blaa><orderLines>') +class TestTypes(TestCase): + def setUp(self): + xml = open('tests/fixtures/escalation_details_lookup.xml', 'r').read() + self.data = parse(xml, 'lookupResponseData') + + def test_unicode(self): + self.assertIsInstance(self.data.lastModifiedBy, unicode) + + def test_timestamp(self): + self.assertIsInstance(self.data.createTimestamp, datetime) + + def test_ts_comp(self): + self.assertGreater(datetime.now(), self.data.createTimestamp) + + def test_list(self): + self.assertIsInstance(self.data.escalationNotes, list) + + class TestErrorFunctions(TestCase): def setUp(self): xml = open('tests/fixtures/multierror.xml', 'r').read() @@ -251,6 +269,7 @@ class TestRepairUpdate(RemoteTestCase): result = self.repair.set_techid('XXXXX') self.assertEqual(result.confirmationNumber, self.dispatchId) + class TestCarryinRepairDetail(TestCase): def setUp(self): self.data = parse('tests/fixtures/repair_details_ca.xml', |