aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_gsxws.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2014-05-13 23:00:58 +0300
committerFilipp Lepalaan <filipp@mac.com>2014-05-13 23:00:58 +0300
commit5652c5955593b1118f8b3d496c84fba4f164129c (patch)
treef04b4bf171da98209ebb332c51cf9d845b4a28f0 /tests/test_gsxws.py
parentd6473bcbede636e8ba553fe6c4df8cd796d0797a (diff)
downloadpy-gsxws-5652c5955593b1118f8b3d496c84fba4f164129c.tar.gz
py-gsxws-5652c5955593b1118f8b3d496c84fba4f164129c.tar.bz2
py-gsxws-5652c5955593b1118f8b3d496c84fba4f164129c.zip
Added some iOS diags tests
Diffstat (limited to 'tests/test_gsxws.py')
-rw-r--r--tests/test_gsxws.py34
1 files changed, 33 insertions, 1 deletions
diff --git a/tests/test_gsxws.py b/tests/test_gsxws.py
index 8ce6328..8f11633 100644
--- a/tests/test_gsxws.py
+++ b/tests/test_gsxws.py
@@ -212,7 +212,7 @@ class TestWarrantyFunctions(TestCase):
self.assertTrue(self.data.partCovered)
-class TestDiagnostics(RemoteTestCase):
+class TestRepairDiagnostics(RemoteTestCase):
def setUp(self):
super(TestDiagnostics, self).setUp()
self.results = diagnostics.Diagnostics(serialNumber=env['GSX_SN']).fetch()
@@ -224,6 +224,38 @@ class TestDiagnostics(RemoteTestCase):
ts = gsx_diags_timestamp(self.results.eventHeader.startTimeStamp)
self.assertIsInstance(ts, datetime)
+
+class TestIosDiagnostics(TestCase):
+ def setUp(self):
+ self.data = parse('tests/fixtures/ios_diagnostics.xml',
+ 'lookupResponseData')
+
+ def test_sn(self):
+ self.assertEqual(self.data.diagnosticTestData.testContext.serialNumber,
+ "XXXXXXXXXXXX")
+
+ def test_result(self):
+ data = self.data.diagnosticTestData.testResult
+ for i in data.result:
+ logging.debug("%s: %s" % (i.name, i.value))
+
+ self.assertEqual(data.result[1].name, "FULLY_CHARGED")
+
+ def test_profile(self):
+ data = self.data.diagnosticProfileData.profile
+ for i in data.unit.key:
+ logging.debug("%s: %s" % (i.name, i.value))
+
+ self.assertEqual(data.unit.key[1].value, "fliPhone")
+
+ def test_report(self):
+ data = self.data.diagnosticProfileData.report
+ for i in data.reportData.key:
+ logging.debug("%s: %s" % (i.name, i.value))
+
+ self.assertEqual(data.reportData.key[0].name, "LAST_USAGE_LENGTH")
+
+
class TestOnsiteCoverage(RemoteTestCase):
def setUp(self):
super(TestOnsiteCoverage, self).setUp()