aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2015-10-14 22:05:49 +0300
committerFilipp Lepalaan <filipp@mac.com>2015-10-14 22:05:49 +0300
commitb6276cd218732db98c0826d7d2659cc0801a433c (patch)
tree60907ede5030b80ec37f8fd3ef0b430313e01836 /tests
parent1bb52b1417a79758e27ba4a3c71ba0f1d4cbbf8b (diff)
downloadpy-gsxws-b6276cd218732db98c0826d7d2659cc0801a433c.tar.gz
py-gsxws-b6276cd218732db98c0826d7d2659cc0801a433c.tar.bz2
py-gsxws-b6276cd218732db98c0826d7d2659cc0801a433c.zip
Added Symptom/Issue test
Diffstat (limited to 'tests')
-rw-r--r--tests/test_gsxws.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/tests/test_gsxws.py b/tests/test_gsxws.py
index 2239419..146fa29 100644
--- a/tests/test_gsxws.py
+++ b/tests/test_gsxws.py
@@ -231,13 +231,23 @@ class TestEscalationFunctions(RemoteTestCase):
self.assertEqual(result.escalationType, 'GSX Help')
-class TestRepairFunctions(RepairTestCase):
+class TestSympomIssueFunctions(RemoteTestCase):
+
+ def setUp(self):
+ super(TestSympomIssueFunctions, self).setUp()
+ self._symptoms = repairs.SymptomIssue(serialNumber=self.sn).fetch()
+ self.symptom = self._symptoms[0][0]
+
def test_symptom_code(self):
- self.assertEqual(self._symptoms[0][0], 'PD17A')
+ self.assertIsInstance(self.symptom, int)
def test_issue_code(self):
- self.assertEqual(self._issues[0][0], 'PD17-01')
-
+ self._issues = repairs.SymptomIssue(reportedSymptomCode=self.symptom).fetch()
+ self.issue = self._issues[0][0]
+ self.assertRegexpMatches(self.issue, r'[A-Z]+')
+
+
+class TestRepairFunctions(RepairTestCase):
def test_create_carryin(self):
rep = repairs.CarryInRepair()
rep.serialNumber = self.sn