aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_gsxws.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@230.to>2013-09-06 22:02:11 +0300
committerFilipp Lepalaan <f@230.to>2013-09-06 22:02:11 +0300
commit36c1e480887902ff7ae0a03c6aa51bbf97a6d036 (patch)
tree0d70144c060e444de3b21dcbe2b04fc45ef4e016 /tests/test_gsxws.py
parentf637233e97c1dee118097b25869a880df640ba8b (diff)
downloadpy-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/test_gsxws.py')
-rw-r--r--tests/test_gsxws.py31
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',