aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gsxws/diagnostics.py10
-rw-r--r--tests/test_gsxws.py4
2 files changed, 14 insertions, 0 deletions
diff --git a/gsxws/diagnostics.py b/gsxws/diagnostics.py
index 959faa3..d6e9c6a 100644
--- a/gsxws/diagnostics.py
+++ b/gsxws/diagnostics.py
@@ -39,6 +39,16 @@ class Diagnostics(GsxObject):
"diagnosticSuitesResponseData")
return self._req.objects
+ def fetch_dc_url(self):
+ """
+ The Fetch Diagnostic Console URL API provides the technician with
+ the AST 2 Diagnostic Console URL, so the technician
+ can easily access the interactive diagnostic suites.
+ """
+ self._submit("fetchDCURLRequestData", "FetchDiagnosticConsoleURL",
+ "fetchDCURLResponseData")
+ return self._req.objects.diagnosticConsoleURL
+
def events(self):
"""
The Fetch Diagnostic Event Numbers API allows users to retrieve all
diff --git a/tests/test_gsxws.py b/tests/test_gsxws.py
index 593b8ca..b2ada9f 100644
--- a/tests/test_gsxws.py
+++ b/tests/test_gsxws.py
@@ -67,6 +67,10 @@ class DiagnosticsTestCase(TestCase):
for r in res.diagnosticProfileData.report.reportData.key:
self.assertUnicodeOrInt(r.value)
+ def test_fetch_dc_url(self):
+ url = self.diag.fetch_dc_url()
+ self.assertRegexpMatches(url, r'^https://')
+
def test_initiate_email(self):
self.diag.emailAddress = os.getenv('GSX_EMAIL')
res = self.diag.initiate()