aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2015-10-01 12:22:17 +0300
committerFilipp Lepalaan <filipp@mac.com>2015-10-01 12:22:17 +0300
commitc6c71309b48062ef9f0315b0d2fe69d6b65fe301 (patch)
tree5886797faca69ae17ca715b4af348ef429d15d8d
parent9d860f29579bc3764ccb9e34f8ae7d51cfc3ea09 (diff)
downloadpy-gsxws-c6c71309b48062ef9f0315b0d2fe69d6b65fe301.tar.gz
py-gsxws-c6c71309b48062ef9f0315b0d2fe69d6b65fe301.tar.bz2
py-gsxws-c6c71309b48062ef9f0315b0d2fe69d6b65fe301.zip
Added fetch DC URL
-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()