Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
amstee committed Jul 26, 2024
1 parent b1cd1d6 commit 9f7685b
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions tests/unit/test_schema_registry_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,15 @@
async def test_validate_schema_request_body():
controller = KarapaceSchemaRegistryController(config=set_config_defaults(DEFAULTS))

controller._validate_schema_request_body("application/json", {
"schema": "{}",
"schemaType": "JSON",
"references": [],
"metadata": {},
"ruleSet": {}
})
controller._validate_schema_request_body( # pylint: disable=W0212
"application/json", {"schema": "{}", "schemaType": "JSON", "references": [], "metadata": {}, "ruleSet": {}}
)

with pytest.raises(HTTPResponse) as exc_info:
controller._validate_schema_request_body("application/json", {
"schema": "{}",
"schemaType": "JSON",
"references": [],
"unexpected_field_name": {},
"ruleSet": {}
})
controller._validate_schema_request_body( # pylint: disable=W0212
"application/json",
{"schema": "{}", "schemaType": "JSON", "references": [], "unexpected_field_name": {}, "ruleSet": {}},
)
assert exc_info.type is HTTPResponse
assert str(exc_info.value) == "HTTPResponse 422"

Expand Down

0 comments on commit 9f7685b

Please sign in to comment.