From b6276cd218732db98c0826d7d2659cc0801a433c Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Wed, 14 Oct 2015 22:05:49 +0300 Subject: Added Symptom/Issue test --- tests/test_gsxws.py | 18 ++++++++++++++---- 1 file 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 -- cgit v1.2.3