From c6c71309b48062ef9f0315b0d2fe69d6b65fe301 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Thu, 1 Oct 2015 12:22:17 +0300 Subject: Added fetch DC URL --- gsxws/diagnostics.py | 10 ++++++++++ tests/test_gsxws.py | 4 ++++ 2 files changed, 14 insertions(+) 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() -- cgit v1.2.3