diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_gsxws.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tests/test_gsxws.py b/tests/test_gsxws.py index 5012a1b..8ce6328 100644 --- a/tests/test_gsxws.py +++ b/tests/test_gsxws.py @@ -6,9 +6,10 @@ from datetime import date, datetime from unittest import main, skip, TestCase -from gsxws.objectify import parse +from gsxws.objectify import parse, gsx_diags_timestamp from gsxws.products import Product -from gsxws import repairs, escalations, lookups, GsxError, ServicePart +from gsxws import (repairs, escalations, lookups, + GsxError, ServicePart, diagnostics) class RemoteTestCase(TestCase): @@ -211,6 +212,18 @@ class TestWarrantyFunctions(TestCase): self.assertTrue(self.data.partCovered) +class TestDiagnostics(RemoteTestCase): + def setUp(self): + super(TestDiagnostics, self).setUp() + self.results = diagnostics.Diagnostics(serialNumber=env['GSX_SN']).fetch() + + def test_diag_result(self): + self.assertEqual(self.results.eventHeader.serialNumber, env['GSX_SN']) + + def test_result_timestamp(self): + ts = gsx_diags_timestamp(self.results.eventHeader.startTimeStamp) + self.assertIsInstance(ts, datetime) + class TestOnsiteCoverage(RemoteTestCase): def setUp(self): super(TestOnsiteCoverage, self).setUp() |