From ecd7d3ab6ce1f9273d1d009908f06298da5f11e5 Mon Sep 17 00:00:00 2001 From: Jens Finkhaeuser Date: Tue, 13 Sep 2016 15:52:02 +0200 Subject: [PATCH] Fix tests after merge --- tests/fakeapi/missing_op_id.yaml | 24 ------------------------ tests/test_api.py | 6 +++--- 2 files changed, 3 insertions(+), 27 deletions(-) delete mode 100644 tests/fakeapi/missing_op_id.yaml diff --git a/tests/fakeapi/missing_op_id.yaml b/tests/fakeapi/missing_op_id.yaml deleted file mode 100644 index 65b66bc91..000000000 --- a/tests/fakeapi/missing_op_id.yaml +++ /dev/null @@ -1,24 +0,0 @@ -swagger: "2.0" - -info: - title: "{{title}}" - version: "1.0" - -basePath: /v1.0 - -paths: - /welcome: - get: - operationId: no.module.or.function - responses: - 200: - description: greeting response - schema: - type: object - put: - # operationId: XXX completely missing - responses: - 200: - description: greeting response - schema: - type: object diff --git a/tests/test_api.py b/tests/test_api.py index 9ce2787d2..d904d6157 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -49,8 +49,8 @@ def test_invalid_operation_does_stop_application_to_setup(): Api(TEST_FOLDER / "fixtures/user_module_loading_error/swagger.yaml", "/api/v1.0", {'title': 'OK'}) - with pytest.raises(ImportError): - Api(TEST_FOLDER / "fakeapi/missing_op_id.yaml", "/api/v1.0", + with pytest.raises(ResolverError): + Api(TEST_FOLDER / "fixtures/missing_op_id/swagger.yaml", "/api/v1.0", {'title': 'OK'}) @@ -71,7 +71,7 @@ def test_invalid_operation_does_not_stop_application_in_debug_mode(): {'title': 'OK'}, debug=True) assert api.specification['info']['title'] == 'OK' - api = Api(TEST_FOLDER / "fakeapi/missing_op_id.yaml", "/api/v1.0", + api = Api(TEST_FOLDER / "fixtures/missing_op_id/swagger.yaml", "/api/v1.0", {'title': 'OK'}, debug=True) assert api.specification['info']['title'] == 'OK'