Skip to content

Commit 6461e72

Browse files
committed
Test fixes
1 parent 78f2c8c commit 6461e72

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/test_cloud.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ def test_base_url_used_instead_of_host(cloud_config):
4242
def test_invalid_host():
4343
with pytest.raises(ValueError) as err:
4444
Client(
45-
host="marklogic.com",
45+
host="localhost",
46+
port=8031,
47+
verify=False,
4648
cloud_api_key="doesnt-matter-for-this-test",
4749
base_path=DEFAULT_BASE_PATH,
4850
)
49-
assert str(err.value).startswith(
50-
"Unable to generate token; status code: 403; cause: "
51-
)
51+
assert "Unable to generate token; status code: 401; cause: " in str(err.value)
5252

5353

5454
def test_invalid_api_key(cloud_config):

tests/test_rows_update.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ def test_update_dsl_wrong_path(admin_client):
5353

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

0 commit comments

Comments
 (0)