diff options
author | Filipp Lepalaan <f@230.to> | 2013-09-06 22:02:11 +0300 |
---|---|---|
committer | Filipp Lepalaan <f@230.to> | 2013-09-06 22:02:11 +0300 |
commit | 36c1e480887902ff7ae0a03c6aa51bbf97a6d036 (patch) | |
tree | 0d70144c060e444de3b21dcbe2b04fc45ef4e016 /tests | |
parent | f637233e97c1dee118097b25869a880df640ba8b (diff) | |
download | py-gsxws-36c1e480887902ff7ae0a03c6aa51bbf97a6d036.tar.gz py-gsxws-36c1e480887902ff7ae0a03c6aa51bbf97a6d036.tar.bz2 py-gsxws-36c1e480887902ff7ae0a03c6aa51bbf97a6d036.zip |
Added set_status and set_techid to shortcuts to Repair
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', |