Skip to content

Commit f3a9321

Browse files
author
Matthew Lynch
committed
fix test
1 parent eae6ff4 commit f3a9321

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

rsconnect/api.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,7 @@ def wait_until_task_is_successful(self, task_id, timeout=180):
11221122
if not finished:
11231123
raise RSConnectException("Application deployment timed out.")
11241124

1125-
if status != 'success':
1125+
if status != "success":
11261126
raise RSConnectException("Application deployment failed with error: {}".format(error))
11271127

11281128
print("Task done: {}".format(description))
@@ -1244,7 +1244,6 @@ def prepare_deploy(
12441244
output = self._rstudio_client.get_content(application.json_data["content_id"])
12451245
self._server.handle_bad_response(output)
12461246

1247-
12481247
app_id_int = application.json_data["id"]
12491248
app_url = output.json_data["url"]
12501249
output_id = output.json_data["id"]

tests/test_main.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,13 @@ def test_deploy_manifest_cloud(self, project_application_id, project_id):
300300
adding_headers={"Content-Type": "application/json"},
301301
status=200,
302302
)
303+
httpretty.register_uri(
304+
httpretty.GET,
305+
"https://api.rstudio.cloud/v1/content/1",
306+
body=open("tests/testdata/rstudio-responses/create-output.json", "r").read(),
307+
adding_headers={"Content-Type": "application/json"},
308+
status=200,
309+
)
303310

304311
def post_output_callback(request, uri, response_headers):
305312
space_id = 917733 if project_application_id else None

0 commit comments

Comments
 (0)