Skip to content

Commit

Permalink
Test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rjrudin committed Mar 20, 2024
1 parent 78f2c8c commit 6461e72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions tests/test_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ def test_base_url_used_instead_of_host(cloud_config):
def test_invalid_host():
with pytest.raises(ValueError) as err:
Client(
host="marklogic.com",
host="localhost",
port=8031,
verify=False,
cloud_api_key="doesnt-matter-for-this-test",
base_path=DEFAULT_BASE_PATH,
)
assert str(err.value).startswith(
"Unable to generate token; status code: 403; cause: "
)
assert "Unable to generate token; status code: 401; cause: " in str(err.value)


def test_invalid_api_key(cloud_config):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_rows_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ def test_update_dsl_wrong_path(admin_client):

update_query_remove = 'op.fromDocUris("' + DOC_URI + '").lockForUpdate().remove()'
response = admin_client.rows.query(update_query_remove, return_response=True)
assert 400 == response.status_code
assert 500 == response.status_code
assert (
"Optic Update need to be run as update transaction"
"Optic plans that perform updates must be sent via HTTP POST to the v1/rows/update endpoint."
in response.content.decode("utf-8")
)

Expand Down

0 comments on commit 6461e72

Please sign in to comment.