Bug 1410799 - Fix API docs for assert_error and assert_success r=jgraham
authorAndreas Tolfsen <ato@sny.no>
Wed, 01 Nov 2017 18:00:49 +0000
changeset 443114 f99477c499ab89d81cad2a76f2586f97a51ef0a9
parent 443113 b4b544f4aaa4d0527e43f58cbc90c68822816f27
child 443115 218cfcb9dbfdc528bee425477614ba5da0264e02
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgraham
bugs1410799
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1410799 - Fix API docs for assert_error and assert_success r=jgraham wdclient was the name of the old GitHub repository. The actual Python package name is "webdriver". MozReview-Commit-ID: FHy3iEB9aAj
testing/web-platform/tests/webdriver/tests/support/asserts.py
--- a/testing/web-platform/tests/webdriver/tests/support/asserts.py
+++ b/testing/web-platform/tests/webdriver/tests/support/asserts.py
@@ -49,38 +49,39 @@ errors = {
 # >         name
 # >     message
 # >         message
 # >     stacktrace
 # >         stacktrace
 # >
 # > 5. Send a response with status and data as arguments.
 def assert_error(response, error_code):
-    """Verify that the provided wdclient.Response instance described a valid
-    error response as defined by `dfn-send-an-error` and the provided error
-    code.
+    """
+    Verify that the provided webdriver.Response instance described
+    a valid error response as defined by `dfn-send-an-error` and
+    the provided error code.
 
-    :param response: wdclient.Response instance
-    :param error_code: string value of the expected "error code"
+    :param response: ``webdriver.Response`` instance.
+    :param error_code: String value of the expected error code
     """
     assert response.status == errors[error_code]
     assert "value" in response.body
     assert response.body["value"]["error"] == error_code
     assert isinstance(response.body["value"]["message"], basestring)
     assert isinstance(response.body["value"]["stacktrace"], basestring)
 
 
 def assert_success(response, value=None):
-    """Verify that the provided wdclient.Response instance described a valid
-    error response as defined by `dfn-send-an-error` and the provided error
-    code.
+    """
+    Verify that the provided webdriver.Response instance described
+    a valid error response as defined by `dfn-send-an-error` and
+    the provided error code.
 
-    :param response: wdclient.Response instance.
+    :param response: ``webdriver.Response`` instance.
     :param value: Expected value of the response body, if any.
-
     """
     assert response.status == 200, str(response.error)
 
     if value is not None:
         assert response.body["value"] == value
     return response.body.get("value")