Techdebt: Replace sure with regular asserts in OpenSearch (#6494)

This commit is contained in:
Bert Blommers 2023-07-07 14:25:11 +00:00 committed by GitHub
parent 0cad3b54f5
commit a84fbd8c95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,8 +73,8 @@ def test_get_compatible_versions_unknown_domain():
with pytest.raises(ClientError) as exc: with pytest.raises(ClientError) as exc:
client.get_compatible_versions(DomainName="testdn") client.get_compatible_versions(DomainName="testdn")
err = exc.value.response["Error"] err = exc.value.response["Error"]
err["Code"].should.equal("ResourceNotFoundException") assert err["Code"] == "ResourceNotFoundException"
err["Message"].should.equal("Domain not found: testdn") assert err["Message"] == "Domain not found: testdn"
@mock_opensearch @mock_opensearch
@ -84,8 +84,8 @@ def test_describe_unknown_domain():
with pytest.raises(ClientError) as exc: with pytest.raises(ClientError) as exc:
client.describe_domain(DomainName="testdn") client.describe_domain(DomainName="testdn")
err = exc.value.response["Error"] err = exc.value.response["Error"]
err["Code"].should.equal("ResourceNotFoundException") assert err["Code"] == "ResourceNotFoundException"
err["Message"].should.equal("Domain not found: testdn") assert err["Message"] == "Domain not found: testdn"
@mock_opensearch @mock_opensearch
@ -108,8 +108,8 @@ def test_delete_domain():
with pytest.raises(ClientError) as exc: with pytest.raises(ClientError) as exc:
client.describe_domain(DomainName="testdn") client.describe_domain(DomainName="testdn")
err = exc.value.response["Error"] err = exc.value.response["Error"]
err["Code"].should.equal("ResourceNotFoundException") assert err["Code"] == "ResourceNotFoundException"
err["Message"].should.equal("Domain not found: testdn") assert err["Message"] == "Domain not found: testdn"
@mock_opensearch @mock_opensearch