diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_gsxws.py | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/tests/test_gsxws.py b/tests/test_gsxws.py index 467a573..19c8d86 100644 --- a/tests/test_gsxws.py +++ b/tests/test_gsxws.py @@ -9,15 +9,19 @@ from gsxws.objectify import parse from gsxws.products import Product from gsxws import repairs, escalations - -class TestEscalationFunctions(TestCase): - @skip("Skip") +class RemoteTestCase(TestCase): def setUp(self): from gsxws.core import connect logging.basicConfig(level=logging.DEBUG) env = os.environ connect(env['GSX_USER'], env['GSX_PASSWORD'], env['GSX_SOLDTO'], env['GSX_ENV']) + +class TestEscalationFunctions(RemoteTestCase): + @skip("Skip") + def setUp(self): + super(TestEscalationFunctions, self).setUp() esc = escalations.Escalation() + env = os.environ esc.shipTo = env['GSX_SHIPTO'] esc.issueTypeCode = 'WS' esc.notes = 'This is a test' @@ -96,12 +100,9 @@ class TestWarrantyFunctions(TestCase): self.assertTrue(self.data.partCovered) -class TestOnsiteCoverage(TestCase): +class TestOnsiteCoverage(RemoteTestCase): def setUp(self): - from gsxws.core import connect - logging.basicConfig(level=logging.DEBUG) - env = os.environ - connect(env['GSX_USER'], env['GSX_PASSWORD'], env['GSX_SOLDTO'], env['GSX_ENV']) + super(TestOnsiteCoverage, self).setUp() self.product = Product('XXXXXXXXXXX') self.product.warranty() @@ -170,6 +171,20 @@ class TestOnsiteDispatchDetail(TestCase): self.assertIsInstance(self.data.dispatchOrderLines.isSerialized, bool) +class TestRepairUpdate(RemoteTestCase): + def setUp(self): + super(TestRepairUpdate, self).setUp() + self.dispatchId = 'G135934345' + self.repair = repairs.CarryInRepair(self.dispatchId) + + def test_set_repair_status(self): + result = self.repair.set_status('BEGR') + self.assertEqual(result.confirmationNumber, self.dispatchId) + + def test_set_repair_techid(self): + 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', |