diff options
author | Filipp Lepalaan <filipp@mac.com> | 2015-08-14 15:49:05 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2015-08-14 15:49:05 +0300 |
commit | 491d967f2e0d6fc62724746a430fe27a9421e639 (patch) | |
tree | 2d7f3b65ba94f80b2aad605b27450b569fa5f7f7 /tests | |
parent | 9de65245974305a17637fd8711f3a88b5ff9db22 (diff) | |
download | py-gsxws-491d967f2e0d6fc62724746a430fe27a9421e639.tar.gz py-gsxws-491d967f2e0d6fc62724746a430fe27a9421e639.tar.bz2 py-gsxws-491d967f2e0d6fc62724746a430fe27a9421e639.zip |
Return symptoms and issues as two-tuples
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_gsxws.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/test_gsxws.py b/tests/test_gsxws.py index 0a8970b..bd2d8b0 100644 --- a/tests/test_gsxws.py +++ b/tests/test_gsxws.py @@ -104,10 +104,10 @@ class RepairTestCase(RemoteTestCase): _comptia.comptiaCode = ccode self.comptia = _comptia - r = repairs.SymptomIssue(serialNumber=self.sn).fetch() - self.symptom = r.symptoms[0].reportedSymptomCode - r = repairs.SymptomIssue(reportedSymptomCode=self.symptom).fetch() - self.issue = r.issues[0].reportedIssueCode + self._symptoms = repairs.SymptomIssue(serialNumber=self.sn).fetch() + self.symptom = self._symptoms[0][0] + self._issues = repairs.SymptomIssue(reportedSymptomCode=self.symptom).fetch() + self.issue = self._issues[0][0] class TestCoreFunctions(TestCase): @@ -210,10 +210,11 @@ class TestEscalationFunctions(RemoteTestCase): class TestRepairFunctions(RepairTestCase): - def test_symptom_issue(self): - from gsxws.repairs import SymptomIssue - r = SymptomIssue(serialNumber=env['GSX_SN']).fetch() - self.assertEqual(r.symptoms[0].reportedSymptomCode, 6115) + def test_symptom_code(self): + self.assertEqual(self._symptoms[0][0], 'PD17A') + + def test_issue_code(self): + self.assertEqual(self._issues[0][0], 'PD17-01') def test_create_carryin(self): rep = repairs.CarryInRepair() |