From a27e16af68cf973df68eaa8117eee0aa96c7f2da Mon Sep 17 00:00:00 2001 From: Richard Date: Thu, 22 Jul 2021 18:23:13 +0100 Subject: [PATCH] Whitespace fixes --- tests/test_schema.py | 3 ++- tests/test_td.py | 16 +++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/tests/test_schema.py b/tests/test_schema.py index 7b41adf..b6add01 100644 --- a/tests/test_schema.py +++ b/tests/test_schema.py @@ -65,10 +65,11 @@ def test_build_action_schema_typeerror(): with pytest.raises(TypeError): action_schema = schema.build_action_schema(input_schema, output_schema) + def test_nest_if_needed(): nested_schema = schema.nest_if_needed(schema.ActionSchema()) assert isinstance(nested_schema, fields.Field) nested_dict = schema.nest_if_needed({"name": fields.Integer()}) assert isinstance(nested_schema, fields.Field) nested_field = schema.nest_if_needed(fields.Boolean()) - assert isinstance(nested_schema, fields.Field) \ No newline at end of file + assert isinstance(nested_schema, fields.Field) diff --git a/tests/test_td.py b/tests/test_td.py index 868724d..a37d18d 100644 --- a/tests/test_td.py +++ b/tests/test_td.py @@ -16,7 +16,9 @@ def test_td_init(helpers, thing, thing_description, app_ctx, schemas_path): validate_spec(thing.spec) -def test_td_add_link(helpers, thing, thing_description, view_cls, app_ctx, schemas_path): +def test_td_add_link( + helpers, thing, thing_description, view_cls, app_ctx, schemas_path +): thing.add_view(view_cls, "/test_view_cls") thing_description.add_link(view_cls, "rel") assert { @@ -71,7 +73,9 @@ def post(self): validate_spec(thing.spec) -def test_td_action_with_schema(helpers, thing, app, thing_description, app_ctx, schemas_path): +def test_td_action_with_schema( + helpers, thing, app, thing_description, app_ctx, schemas_path +): class Index(ActionView): args = {"integer": fields.Int()} semtype = "ToggleAction" @@ -87,7 +91,7 @@ def post(self): with app_ctx.test_request_context(): assert "index" in thing_description.to_dict().get("actions") helpers.validate_thing_description(thing_description, app_ctx, schemas_path) - + validate_spec(thing.spec) @@ -145,7 +149,9 @@ def get(self): validate_spec(thing.spec) -def test_td_property_write_only(helpers, app, thing, thing_description, app_ctx, schemas_path): +def test_td_property_write_only( + helpers, app, thing, thing_description, app_ctx, schemas_path +): class Index(PropertyView): schema = fields.Int() @@ -160,7 +166,7 @@ def put(self): with app_ctx.test_request_context(): assert "index" in thing_description.to_dict().get("properties") helpers.validate_thing_description(thing_description, app_ctx, schemas_path) - + validate_spec(thing.spec)