project_name string | class_name string | class_modifiers string | class_implements int64 | class_extends int64 | function_name string | function_body string | cyclomatic_complexity int64 | NLOC int64 | num_parameter int64 | num_token int64 | num_variable int64 | start_line int64 | end_line int64 | function_index int64 | function_params string | function_variable string | function_return_type string | function_body_line_type string | function_num_functions int64 | function_num_lines int64 | outgoing_function_count int64 | outgoing_function_names string | incoming_function_count int64 | incoming_function_names string | lexical_representation string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Yelp_pyramid_swagger | public | public | 0 | 0 | test_exclude_path_with_old_setting | def test_exclude_path_with_old_setting():# TODO(#63): remove deprecated `skip_validation` setting in v2.0.paths = [r'/foo/', r'/bar/']assert_eq_regex_lists(get_exclude_paths(Mock(settings={'pyramid_swagger.skip_validation': paths})),[re.compile(r) for r in paths]) | 2 | 7 | 0 | 42 | 1 | 72 | 79 | 72 | ['paths'] | None | {"Assign": 1, "Expr": 1} | 4 | 8 | 4 | ["assert_eq_regex_lists", "get_exclude_paths", "Mock", "re.compile"] | 0 | [] | The function (test_exclude_path_with_old_setting) defined within the public class called public.The function start at line 72 and ends at 79. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 4.0 functions, and It h... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_response_content_type_missing_raises_5xx | def test_response_content_type_missing_raises_5xx():with pytest.raises(ResponseValidationError) as excinfo:prepare_body(# there is no way to instantiate a Response object with no content typemock.Mock(spec=Response, content_type=None),)assert 'Content-Type must be set' in str(excinfo.value) | 1 | 6 | 0 | 39 | 0 | 82 | 89 | 82 | [] | None | {"Expr": 1, "With": 1} | 4 | 8 | 4 | ["pytest.raises", "prepare_body", "mock.Mock", "str"] | 0 | [] | The function (test_response_content_type_missing_raises_5xx) defined within the public class called public.The function start at line 82 and ends at 89. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 functions... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | mock_route_info | def mock_route_info():class MockRoute(object):name = 'route-one'return {'route': MockRoute} | 1 | 4 | 0 | 19 | 1 | 93 | 97 | 93 | ['name'] | Returns | {"Assign": 1, "Return": 1} | 0 | 5 | 0 | [] | 0 | [] | The function (mock_route_info) defined within the public class called public.The function start at line 93 and ends at 97. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value.. | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_should_exclude_route | def test_should_exclude_route(mock_route_info):assert should_exclude_route(set(['route-one', 'two']), mock_route_info) | 1 | 2 | 1 | 19 | 0 | 100 | 101 | 100 | mock_route_info | [] | None | {} | 2 | 2 | 2 | ["should_exclude_route", "set"] | 0 | [] | The function (test_should_exclude_route) defined within the public class called public.The function start at line 100 and ends at 101. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 ... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_should_exclude_route_no_matched_route | def test_should_exclude_route_no_matched_route(mock_route_info):assert not should_exclude_route(set(['foo', 'two']), mock_route_info) | 1 | 2 | 1 | 20 | 0 | 104 | 105 | 104 | mock_route_info | [] | None | {} | 2 | 2 | 2 | ["should_exclude_route", "set"] | 0 | [] | The function (test_should_exclude_route_no_matched_route) defined within the public class called public.The function start at line 104 and ends at 105. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions,... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_should_exclude_route_no_route | def test_should_exclude_route_no_route():assert not should_exclude_route(set(['foo', 'two']), {'route': None}) | 1 | 2 | 0 | 23 | 0 | 108 | 109 | 108 | [] | None | {} | 2 | 2 | 2 | ["should_exclude_route", "set"] | 0 | [] | The function (test_should_exclude_route_no_route) defined within the public class called public.The function start at line 108 and ends at 109. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_should_exclude_response_validation | def test_should_exclude_response_validation(settings, mock_route_info):settings.response_validation_exclude_routes = ['route-one', 'two']assert should_exclude_response_validation(settings, mock_route_info) | 1 | 3 | 2 | 23 | 0 | 112 | 114 | 112 | settings,mock_route_info | [] | None | {"Assign": 1} | 1 | 3 | 1 | ["should_exclude_response_validation"] | 0 | [] | The function (test_should_exclude_response_validation) defined within the public class called public.The function start at line 112 and ends at 114. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [112.0] and does not return any value. It declare 1.0 function, ... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_should_exclude_response_validation_no_matched_route | def test_should_exclude_response_validation_no_matched_route(settings, mock_route_info):settings.response_validation_exclude_routes = ['foo', 'two']assert not should_exclude_response_validation(settings, mock_route_info) | 1 | 3 | 2 | 24 | 0 | 117 | 119 | 117 | settings,mock_route_info | [] | None | {"Assign": 1} | 1 | 3 | 1 | ["should_exclude_response_validation"] | 0 | [] | The function (test_should_exclude_response_validation_no_matched_route) defined within the public class called public.The function start at line 117 and ends at 119. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [117.0] and does not return any value. It decla... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_should_exclude_response_validation_no_route | def test_should_exclude_response_validation_no_route():settings.response_validation_exclude_routes = ['foo', 'two']assert not should_exclude_response_validation(settings, {'route': None}) | 1 | 3 | 0 | 25 | 0 | 122 | 124 | 122 | [] | None | {"Assign": 1} | 1 | 3 | 1 | ["should_exclude_response_validation"] | 0 | [] | The function (test_should_exclude_response_validation_no_route) defined within the public class called public.The function start at line 122 and ends at 124. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 funct... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_validation_skips_path_properly | def test_validation_skips_path_properly():excluded_paths = [re.compile(r) for r in DEFAULT_EXCLUDED_PATHS]assert should_exclude_path(excluded_paths, '/static')assert should_exclude_path(excluded_paths, '/static/foobar')assert should_exclude_path(excluded_paths, '/api-docs')assert should_exclude_path(excluded_paths, '/a... | 2 | 8 | 0 | 62 | 1 | 127 | 135 | 127 | ['excluded_paths'] | None | {"Assign": 1} | 7 | 9 | 7 | ["re.compile", "should_exclude_path", "should_exclude_path", "should_exclude_path", "should_exclude_path", "should_exclude_path", "should_exclude_path"] | 0 | [] | The function (test_validation_skips_path_properly) defined within the public class called public.The function start at line 127 and ends at 135. It contains 8 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 7.0 functions, and I... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_validation_content_type_with_json | def test_validation_content_type_with_json():fake_schema = mock.Mock(response_body_schema={'type': 'object'})fake_validator = mock.Mock(schema=fake_schema)body = {'status': 'good'}response = Response(body=simplejson.dumps(body),headers={'Content-Type': 'application/json; charset=UTF-8'},)validator_map = mock.Mock(spec=... | 1 | 11 | 0 | 85 | 5 | 140 | 150 | 140 | ['body', 'validator_map', 'fake_schema', 'fake_validator', 'response'] | None | {"Assign": 5, "Expr": 2} | 7 | 11 | 7 | ["mock.Mock", "mock.Mock", "Response", "simplejson.dumps", "mock.Mock", "validate_response", "fake_validator.validate.assert_called_once_with"] | 0 | [] | The function (test_validation_content_type_with_json) defined within the public class called public.The function start at line 140 and ends at 150. It contains 11 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 7.0 functions, an... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_skips_validating_errors | def test_skips_validating_errors():fake_schema = mock.Mock(response_body_schema={'type': 'string'})fake_validator = mock.Mock(schema=fake_schema)fake_validator_map = mock.Mock(response=fake_validator)response = Response(body='abe1351f',status_code=403,)validate_response(response, fake_validator_map)assert not fake_vali... | 1 | 10 | 0 | 64 | 4 | 153 | 162 | 153 | ['fake_schema', 'fake_validator', 'response', 'fake_validator_map'] | None | {"Assign": 4, "Expr": 1} | 5 | 10 | 5 | ["mock.Mock", "mock.Mock", "mock.Mock", "Response", "validate_response"] | 0 | [] | The function (test_skips_validating_errors) defined within the public class called public.The function start at line 153 and ends at 162. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has ... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_raw_string | def test_raw_string():fake_schema = mock.Mock(response_body_schema={'type': 'string'})fake_validator = mock.Mock(spec=SchemaValidator, schema=fake_schema)response = Response(body='abe1351f',headers={'Content-Type': 'application/text; charset=UTF-8'},)validator_map = mock.Mock(spec=ValidatorMap, response=fake_validator)... | 1 | 11 | 0 | 84 | 4 | 165 | 175 | 165 | ['validator_map', 'fake_schema', 'fake_validator', 'response'] | None | {"Assign": 4, "Expr": 2} | 7 | 11 | 7 | ["mock.Mock", "mock.Mock", "Response", "mock.Mock", "validate_response", "fake_validator.validate.assert_called_once_with", "response.body.decode"] | 0 | [] | The function (test_raw_string) defined within the public class called public.The function start at line 165 and ends at 175. It contains 11 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 7.0 functions, and It has 7.0 functions... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | build_mock_validator | def build_mock_validator(properties):return mock.Mock(spec=['schema', 'validate'],schema={'properties': dict((name, {'type': type_})for name, type_ in properties.items())},) | 2 | 10 | 1 | 48 | 0 | 178 | 187 | 178 | properties | [] | Returns | {"Return": 1} | 3 | 10 | 3 | ["mock.Mock", "dict", "properties.items"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95056683_Yelp_pyramid_swagger.tests.tween_test_py.test_handle_request_returns_request_data"] | The function (build_mock_validator) defined within the public class called public.The function start at line 178 and ends at 187. It contains 10 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 3.0 functions, It has 3.0 funct... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_handle_request_returns_request_data | def test_handle_request_returns_request_data():mock_request = mock.Mock(spec=PyramidSwaggerRequest,query={'int': '123', 'float': '3.14'},form={'form_int': '333', 'string2': 'xyz'},path={'path_int': '222', 'string': 'abc'},headers={'X-Is-Bool': 'True'},body={'more': 'foo'},)body_validator = build_mock_validator({'more':... | 1 | 30 | 0 | 202 | 5 | 190 | 223 | 190 | ['request_data', 'mock_request', 'expected', 'body_validator', 'validator_map'] | None | {"Assign": 6} | 8 | 34 | 8 | ["mock.Mock", "build_mock_validator", "mock.Mock", "build_mock_validator", "build_mock_validator", "build_mock_validator", "build_mock_validator", "handle_request"] | 0 | [] | The function (test_handle_request_returns_request_data) defined within the public class called public.The function start at line 190 and ends at 223. It contains 30 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 8.0 functions, ... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_get_op_for_request_found | def test_get_op_for_request_found():request = Mock(spec=Request)route_info = {'route': Mock(spec=Route, path='/foo/{id}')}expected_op = Mock(spec=Operation)swagger_spec = Mock(spec=Spec,get_op_for_request=Mock(return_value=expected_op))assert expected_op == get_op_for_request(request, route_info, swagger_spec) | 1 | 7 | 0 | 64 | 4 | 226 | 232 | 226 | ['route_info', 'swagger_spec', 'request', 'expected_op'] | None | {"Assign": 4} | 6 | 7 | 6 | ["Mock", "Mock", "Mock", "Mock", "Mock", "get_op_for_request"] | 0 | [] | The function (test_get_op_for_request_found) defined within the public class called public.The function start at line 226 and ends at 232. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has ... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_get_op_for_request_not_found_route_not_registered | def test_get_op_for_request_not_found_route_not_registered():request = Mock(spec=Request, method='GET', url='http://localhost/foo/1')route_info = {'route': Mock(spec=[])}swagger_spec = Mock(spec=Spec)with pytest.raises(PathNotMatchedError) as excinfo:get_op_for_request(request, route_info, swagger_spec)assert 'Could no... | 1 | 7 | 0 | 68 | 3 | 235 | 241 | 235 | ['route_info', 'swagger_spec', 'request'] | None | {"Assign": 3, "Expr": 1, "With": 1} | 6 | 7 | 6 | ["Mock", "Mock", "Mock", "pytest.raises", "get_op_for_request", "str"] | 0 | [] | The function (test_get_op_for_request_not_found_route_not_registered) defined within the public class called public.The function start at line 235 and ends at 241. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_get_op_for_request_not_found_when_no_match_in_swagger_spec | def test_get_op_for_request_not_found_when_no_match_in_swagger_spec():request = Mock(spec=Request, method='GET', url='http://localhost/foo/1')route_info = {'route': Mock(spec=Route, path='/foo/{id}')}mock_bravado_core_get_op_for_request = Mock(return_value=None)swagger_spec = Mock(spec=Spec, get_op_for_request=mock_bra... | 1 | 10 | 0 | 89 | 4 | 244 | 253 | 244 | ['route_info', 'swagger_spec', 'request', 'mock_bravado_core_get_op_for_request'] | None | {"Assign": 4, "Expr": 1, "With": 1} | 7 | 10 | 7 | ["Mock", "Mock", "Mock", "Mock", "pytest.raises", "get_op_for_request", "str"] | 0 | [] | The function (test_get_op_for_request_not_found_when_no_match_in_swagger_spec) defined within the public class called public.The function start at line 244 and ends at 253. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It d... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_get_swagger_versions_success | def test_get_swagger_versions_success():for versions in (['1.2'], ['2.0'], ['1.2', '2.0']):settings = {'pyramid_swagger.swagger_versions': versions}assert set(versions) == get_swagger_versions(settings) | 2 | 4 | 0 | 40 | 1 | 256 | 259 | 256 | ['settings'] | None | {"Assign": 1, "For": 1} | 2 | 4 | 2 | ["set", "get_swagger_versions"] | 0 | [] | The function (test_get_swagger_versions_success) defined within the public class called public.The function start at line 256 and ends at 259. It contains 4 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It ... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_get_swagger_versions_empty | def test_get_swagger_versions_empty():settings = {'pyramid_swagger.swagger_versions': []}with pytest.raises(ValueError) as excinfo:get_swagger_versions(settings)assert 'pyramid_swagger.swagger_versions is empty' in str(excinfo.value) | 1 | 5 | 0 | 35 | 1 | 262 | 266 | 262 | ['settings'] | None | {"Assign": 1, "Expr": 1, "With": 1} | 3 | 5 | 3 | ["pytest.raises", "get_swagger_versions", "str"] | 0 | [] | The function (test_get_swagger_versions_empty) defined within the public class called public.The function start at line 262 and ends at 266. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It ha... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_get_swagger_versions_unsupported | def test_get_swagger_versions_unsupported():settings = {'pyramid_swagger.swagger_versions': ['10.0', '2.0']}with pytest.raises(ValueError) as excinfo:get_swagger_versions(settings)assert 'Swagger version 10.0 is not supported' in str(excinfo.value) | 1 | 5 | 0 | 38 | 1 | 269 | 273 | 269 | ['settings'] | None | {"Assign": 1, "Expr": 1, "With": 1} | 3 | 5 | 3 | ["pytest.raises", "get_swagger_versions", "str"] | 0 | [] | The function (test_get_swagger_versions_unsupported) defined within the public class called public.The function start at line 269 and ends at 273. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and ... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_validaton_error_decorator_transforms_SwaggerMappingError.foo | def foo():raise SwaggerMappingError('kaboom') | 1 | 2 | 0 | 9 | 0 | 279 | 280 | 279 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_validaton_error_decorator_transforms_SwaggerMappingError.foo) defined within the public class called public.The function start at line 279 and ends at 280. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_validaton_error_decorator_transforms_SwaggerMappingError | def test_validaton_error_decorator_transforms_SwaggerMappingError():@validation_error(RequestValidationError)def foo():raise SwaggerMappingError('kaboom')with pytest.raises(RequestValidationError) as excinfo:foo()assert 'kaboom' in str(excinfo.value) | 1 | 6 | 0 | 33 | 0 | 276 | 284 | 276 | [] | None | {"Expr": 1, "With": 1} | 5 | 9 | 5 | ["SwaggerMappingError", "validation_error", "pytest.raises", "foo", "str"] | 0 | [] | The function (test_validaton_error_decorator_transforms_SwaggerMappingError) defined within the public class called public.The function start at line 276 and ends at 284. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It decl... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_validation_error_includes_child.foo | def foo():raise SwaggerMappingError('kaboom') | 1 | 2 | 0 | 9 | 0 | 290 | 291 | 290 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (test_validation_error_includes_child.foo) defined within the public class called public.The function start at line 290 and ends at 291. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_validation_error_includes_child | def test_validation_error_includes_child():@validation_error(RequestValidationError)def foo():raise SwaggerMappingError('kaboom')try:foo()except RequestValidationError as e:assert isinstance(e.child, SwaggerMappingError)assert 'kaboom' in str(e) | 2 | 8 | 0 | 37 | 0 | 287 | 297 | 287 | [] | None | {"Expr": 1, "Try": 1} | 5 | 11 | 5 | ["SwaggerMappingError", "validation_error", "foo", "isinstance", "str"] | 0 | [] | The function (test_validation_error_includes_child) defined within the public class called public.The function start at line 287 and ends at 297. It contains 8 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 5.0 functions, and ... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | registry | def registry():config = {'pyramid_swagger.schema12': None,'pyramid_swagger.schema20': None,}return Mock(settings=config) | 1 | 6 | 0 | 23 | 1 | 301 | 306 | 301 | ['config'] | Returns | {"Assign": 1, "Return": 1} | 1 | 6 | 1 | ["Mock"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3676862_pecan_pecan.pecan.tests.test_jsonify_py.TestJsonifySQLAlchemyGenericEncoder.create_sa_proxies"] | The function (registry) defined within the public class called public.The function start at line 301 and ends at 306. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function called insi... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | settings | def settings():return Mock(spec=Settings) | 1 | 2 | 0 | 11 | 0 | 310 | 311 | 310 | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["Mock"] | 37 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3613668_guillermooo_dart_sublime_bundle.execute_py.DartExecCommand.run", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3667502_braver_sidebartools.SideBar_py.get_setting", "_.content.gdrive.MyDrive.Phd_Thesis.Datase... | The function (settings) defined within the public class called public.The function start at line 310 and ends at 311. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function called insi... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_get_swagger20_objects_if_only_swagger20_version_is_present | def test_get_swagger20_objects_if_only_swagger20_version_is_present(settings, registry):registry.settings['pyramid_swagger.swagger_versions'] = [SWAGGER_20]registry.settings['pyramid_swagger.schema20'] = 'schema20'swagger_handler, spec = get_swagger_objects(settings, {}, registry)assert 'swagger20_handler' in str(swagg... | 1 | 7 | 2 | 49 | 0 | 314 | 320 | 314 | settings,registry | [] | None | {"Assign": 3} | 2 | 7 | 2 | ["get_swagger_objects", "str"] | 0 | [] | The function (test_get_swagger20_objects_if_only_swagger20_version_is_present) defined within the public class called public.The function start at line 314 and ends at 320. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [314.0] and does not return any value. I... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_get_swagger12_objects_if_only_swagger12_version_is_present | def test_get_swagger12_objects_if_only_swagger12_version_is_present(settings, registry):registry.settings['pyramid_swagger.swagger_versions'] = [SWAGGER_12]registry.settings['pyramid_swagger.schema12'] = 'schema12'swagger_handler, spec = get_swagger_objects(settings, {}, registry)assert 'swagger12_handler' in str(swagg... | 1 | 7 | 2 | 49 | 0 | 323 | 329 | 323 | settings,registry | [] | None | {"Assign": 3} | 2 | 7 | 2 | ["get_swagger_objects", "str"] | 0 | [] | The function (test_get_swagger12_objects_if_only_swagger12_version_is_present) defined within the public class called public.The function start at line 323 and ends at 329. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [323.0] and does not return any value. I... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_get_swagger20_objects_if_both_present_but_no_prefer20_config | def test_get_swagger20_objects_if_both_present_but_no_prefer20_config(settings, registry):registry.settings['pyramid_swagger.swagger_versions'] = [SWAGGER_12, SWAGGER_20]registry.settings['pyramid_swagger.schema20'] = 'schema20'swagger_handler, spec = get_swagger_objects(settings, {}, registry)assert 'swagger20_handler... | 1 | 8 | 2 | 51 | 0 | 332 | 339 | 332 | settings,registry | [] | None | {"Assign": 3} | 2 | 8 | 2 | ["get_swagger_objects", "str"] | 0 | [] | The function (test_get_swagger20_objects_if_both_present_but_no_prefer20_config) defined within the public class called public.The function start at line 332 and ends at 339. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [332.0] and does not return any value.... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_get_swagger20_objects_if_both_present_but_route_in_prefer20 | def test_get_swagger20_objects_if_both_present_but_route_in_prefer20(settings, registry):settings.prefer_20_routes = ['swagger20_route']registry.settings['pyramid_swagger.swagger_versions'] = [SWAGGER_12, SWAGGER_20]route_info = {'route': Mock()}route_info['route'].name = 'swagger20_route'registry.settings['pyramid_swa... | 1 | 11 | 2 | 74 | 1 | 342 | 352 | 342 | settings,registry | ['route_info'] | None | {"Assign": 6} | 3 | 11 | 3 | ["Mock", "get_swagger_objects", "str"] | 0 | [] | The function (test_get_swagger20_objects_if_both_present_but_route_in_prefer20) defined within the public class called public.The function start at line 342 and ends at 352. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [342.0] and does not return any value.... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_get_swagger20_objects_if_both_present_but_request_has_no_route | def test_get_swagger20_objects_if_both_present_but_request_has_no_route(settings, registry):settings.prefer_20_routes = ['swagger20_route']registry.settings['pyramid_swagger.swagger_versions'] = [SWAGGER_12, SWAGGER_20]registry.settings['pyramid_swagger.schema20'] = 'schema20'swagger_handler, spec = get_swagger_objects... | 1 | 9 | 2 | 58 | 0 | 355 | 363 | 355 | settings,registry | [] | None | {"Assign": 4} | 2 | 9 | 2 | ["get_swagger_objects", "str"] | 0 | [] | The function (test_get_swagger20_objects_if_both_present_but_request_has_no_route) defined within the public class called public.The function start at line 355 and ends at 363. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [355.0] and does not return any valu... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_get_swagger12_objects_if_both_present_but_route_not_in_prefer20 | def test_get_swagger12_objects_if_both_present_but_route_not_in_prefer20(settings, registry):settings.prefer_20_routes = ['swagger20_route']registry.settings['pyramid_swagger.swagger_versions'] = [SWAGGER_12, SWAGGER_20]route_info = {'route': Mock()}route_info['route'].name = 'swagger12_route'registry.settings['pyramid... | 1 | 11 | 2 | 74 | 1 | 366 | 376 | 366 | settings,registry | ['route_info'] | None | {"Assign": 6} | 3 | 11 | 3 | ["Mock", "get_swagger_objects", "str"] | 0 | [] | The function (test_get_swagger12_objects_if_both_present_but_route_not_in_prefer20) defined within the public class called public.The function start at line 366 and ends at 376. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [366.0] and does not return any va... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_is_swagger_documentation_route_without_route_is_safe | def test_is_swagger_documentation_route_without_route_is_safe():"""Not sure if `None` is an option for the `route_info` dict, but makesure nothing crashes in that possible scenario."""from pyramid_swagger.tween import is_swagger_documentation_routeassert is_swagger_documentation_route(None) is False | 1 | 3 | 0 | 18 | 0 | 379 | 385 | 379 | [] | None | {"Expr": 1} | 1 | 7 | 1 | ["is_swagger_documentation_route"] | 0 | [] | The function (test_is_swagger_documentation_route_without_route_is_safe) defined within the public class called public.The function start at line 379 and ends at 385. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare ... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_request_properties | def test_request_properties():root_request = Request({}, headers={"X-Some-Special-Header": "foobar"})# this is a slightly baroque mechanism to make sure that the request is# internally consistent for all test environmentsroot_request.body = '{"myKey": 42}'.encode()assert '{"myKey": 42}' == root_request.textrequest = Py... | 1 | 7 | 0 | 62 | 2 | 388 | 396 | 388 | ['root_request', 'request'] | None | {"Assign": 3} | 3 | 9 | 3 | ["Request", "encode", "PyramidSwaggerRequest"] | 0 | [] | The function (test_request_properties) defined within the public class called public.The function start at line 388 and ends at 396. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 fu... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_response_properties | def test_response_properties():root_response = Response(headers={"X-Some-Special-Header": "foobar"},body=b'{"myKey": 42}')# these must be set for the "text" attribute of webob.Response to be# readable, and setting them in the constructor gets into a conflict# with the custom header argumentroot_response.content_type = ... | 1 | 12 | 0 | 65 | 2 | 399 | 413 | 399 | ['root_response', 'response'] | None | {"Assign": 4} | 2 | 15 | 2 | ["Response", "PyramidSwaggerResponse"] | 0 | [] | The function (test_response_properties) defined within the public class called public.The function start at line 399 and ends at 413. It contains 12 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 ... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_empty_response_properties | def test_empty_response_properties():root_response = Response(headers={"X-Some-Special-Header": "foobar"})response = PyramidSwaggerResponse(root_response)assert response.text is Noneassert "foobar" == response.headers["X-Some-Special-Header"]assert response.content_type is None | 1 | 6 | 0 | 43 | 2 | 416 | 421 | 416 | ['root_response', 'response'] | None | {"Assign": 2} | 2 | 6 | 2 | ["Response", "PyramidSwaggerResponse"] | 0 | [] | The function (test_empty_response_properties) defined within the public class called public.The function start at line 416 and ends at 421. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | settings | def settings():return {'pyramid_swagger.schema_directory': os.path.join('tests', 'sample_schemas', 'good_app'),'pyramid_swagger.enable_swagger_spec_validation': False,} | 1 | 5 | 0 | 26 | 0 | 13 | 17 | 13 | [] | Returns | {"Return": 1} | 1 | 5 | 1 | ["os.path.join"] | 37 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3613668_guillermooo_dart_sublime_bundle.execute_py.DartExecCommand.run", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3667502_braver_sidebartools.SideBar_py.get_setting", "_.content.gdrive.MyDrive.Phd_Thesis.Datase... | The function (settings) defined within the public class called public.The function start at line 13 and ends at 17. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function called inside... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | default_test_app | def default_test_app(settings):return App(main({}, **settings)) | 1 | 2 | 1 | 17 | 0 | 21 | 22 | 21 | settings | [] | Returns | {"Return": 1} | 2 | 2 | 2 | ["App", "main"] | 0 | [] | The function (default_test_app) defined within the public class called public.The function start at line 21 and ends at 22. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, and It has 2.0 functio... |
Yelp_pyramid_swagger | public | public | 0 | 0 | swagger_20_test_app | def swagger_20_test_app(settings):"""Fixture for setting up a Swagger 2.0 version of the test test_app."""settings['pyramid_swagger.swagger_versions'] = ['2.0']return App(main({}, **settings)) | 1 | 3 | 1 | 26 | 0 | 26 | 29 | 26 | settings | [] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 4 | 2 | ["App", "main"] | 0 | [] | The function (swagger_20_test_app) defined within the public class called public.The function start at line 26 and ends at 29. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, and It has 2.0 func... |
Yelp_pyramid_swagger | public | public | 0 | 0 | swagger_12_test_app | def swagger_12_test_app(settings):"""Fixture for setting up a Swagger 1.2 version of the test test_app."""settings['pyramid_swagger.swagger_versions'] = ['1.2']return App(main({}, **settings)) | 1 | 3 | 1 | 26 | 0 | 33 | 36 | 33 | settings | [] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 4 | 2 | ["App", "main"] | 0 | [] | The function (swagger_12_test_app) defined within the public class called public.The function start at line 33 and ends at 36. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, and It has 2.0 func... |
Yelp_pyramid_swagger | public | public | 0 | 0 | swagger_12_and_20_test_app | def swagger_12_and_20_test_app(settings):"""Fixture for setting up a Swagger 1.2 and Swagger 2.0 version of thetest test_app."""settings['pyramid_swagger.swagger_versions'] = ['1.2', '2.0']return App(main({}, **settings)) | 1 | 3 | 1 | 28 | 0 | 40 | 45 | 40 | settings | [] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 6 | 2 | ["App", "main"] | 0 | [] | The function (swagger_12_and_20_test_app) defined within the public class called public.The function start at line 40 and ends at 45. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, and It has 2... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_12_api_docs | def test_12_api_docs(swagger_12_test_app):response = swagger_12_test_app.get('/api-docs', status=200)assert response.json['swaggerVersion'] == '1.2' | 1 | 3 | 1 | 26 | 1 | 49 | 51 | 49 | swagger_12_test_app | ['response'] | None | {"Assign": 1} | 2 | 3 | 2 | ["swagger_12_test_app.get", "pytest.mark.skip"] | 0 | [] | The function (test_12_api_docs) defined within the public class called public.The function start at line 49 and ends at 51. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functions c... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_12_sample_resource | def test_12_sample_resource(swagger_12_test_app):response = swagger_12_test_app.get('/api-docs/sample', status=200)assert response.json['swaggerVersion'] == '1.2' | 1 | 3 | 1 | 26 | 1 | 55 | 57 | 55 | swagger_12_test_app | ['response'] | None | {"Assign": 1} | 2 | 3 | 2 | ["swagger_12_test_app.get", "pytest.mark.skip"] | 0 | [] | The function (test_12_sample_resource) defined within the public class called public.The function start at line 55 and ends at 57. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 func... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_12_other_sample_resource | def test_12_other_sample_resource(swagger_12_test_app):response = swagger_12_test_app.get('/api-docs/other_sample', status=200)assert response.json['swaggerVersion'] == '1.2' | 1 | 3 | 1 | 26 | 1 | 61 | 63 | 61 | swagger_12_test_app | ['response'] | None | {"Assign": 1} | 2 | 3 | 2 | ["swagger_12_test_app.get", "pytest.mark.skip"] | 0 | [] | The function (test_12_other_sample_resource) defined within the public class called public.The function start at line 61 and ends at 63. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_20_schema | def test_20_schema(swagger_20_test_app):response = swagger_20_test_app.get('/swagger.json', status=200)assert response.json['swagger'] == '2.0' | 1 | 3 | 1 | 26 | 1 | 66 | 68 | 66 | swagger_20_test_app | ['response'] | None | {"Assign": 1} | 1 | 3 | 1 | ["swagger_20_test_app.get"] | 0 | [] | The function (test_20_schema) defined within the public class called public.The function start at line 66 and ends at 68. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function called... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_12_and_20_schemas | def test_12_and_20_schemas(swagger_12_and_20_test_app):for path in ('/api-docs', '/api-docs/sample', '/api-docs/other_sample'):response12 = swagger_12_and_20_test_app.get(path, status=200)assert response12.json['swaggerVersion'] == '1.2'response20 = swagger_12_and_20_test_app.get('/swagger.json', status=200)assert resp... | 2 | 6 | 1 | 58 | 2 | 72 | 78 | 72 | swagger_12_and_20_test_app | ['response12', 'response20'] | None | {"Assign": 2, "For": 1} | 3 | 7 | 3 | ["swagger_12_and_20_test_app.get", "swagger_12_and_20_test_app.get", "pytest.mark.skip"] | 0 | [] | The function (test_12_and_20_schemas) defined within the public class called public.The function start at line 72 and ends at 78. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 funct... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_default_only_serves_up_swagger_20_schema | def test_default_only_serves_up_swagger_20_schema(default_test_app):response = default_test_app.get('/swagger.json', status=200)assert response.json['swagger'] == '2.0'# swagger 1.2 schemas should 404for path in ('/api-docs', '/api-docs/sample', '/api-docs/other_sample'):default_test_app.get(path, status=404) | 2 | 5 | 1 | 47 | 1 | 81 | 87 | 81 | default_test_app | ['response'] | None | {"Assign": 1, "Expr": 1, "For": 1} | 2 | 7 | 2 | ["default_test_app.get", "default_test_app.get"] | 0 | [] | The function (test_default_only_serves_up_swagger_20_schema) defined within the public class called public.The function start at line 81 and ends at 87. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 2.0 functions... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_recursive_swagger_api_internal_refs | def test_recursive_swagger_api_internal_refs():recursive_test_app = App(main({}, **{'pyramid_swagger.schema_directory':'tests/sample_schemas/recursive_app/internal/',}))recursive_test_app.get('/swagger.json', status=200) | 1 | 6 | 0 | 32 | 1 | 90 | 96 | 90 | ['recursive_test_app'] | None | {"Assign": 1, "Expr": 1} | 3 | 7 | 3 | ["App", "main", "recursive_test_app.get"] | 0 | [] | The function (test_recursive_swagger_api_internal_refs) defined within the public class called public.The function start at line 90 and ends at 96. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_recursive_swagger_api_external_refs | def test_recursive_swagger_api_external_refs():recursive_test_app = App(main({}, **{'pyramid_swagger.schema_directory':'tests/sample_schemas/recursive_app/external/',}))recursive_test_app.get('/swagger.json', status=200)recursive_test_app.get('/external.json', status=200) | 1 | 7 | 0 | 42 | 1 | 99 | 106 | 99 | ['recursive_test_app'] | None | {"Assign": 1, "Expr": 2} | 4 | 8 | 4 | ["App", "main", "recursive_test_app.get", "recursive_test_app.get"] | 0 | [] | The function (test_recursive_swagger_api_external_refs) defined within the public class called public.The function start at line 99 and ends at 106. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 functions, an... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_base_path_api_docs_on_good_app_schema | def test_base_path_api_docs_on_good_app_schema():base_path = '/web/base/path'recursive_test_app = App(main({}, **{'pyramid_swagger.schema_directory':'tests/sample_schemas/good_app/','pyramid_swagger.base_path_api_docs':base_path}))recursive_test_app.get(base_path + '/swagger.json', status=200)recursive_test_app.get('/s... | 1 | 10 | 0 | 50 | 2 | 109 | 120 | 109 | ['base_path', 'recursive_test_app'] | None | {"Assign": 2, "Expr": 2} | 4 | 12 | 4 | ["App", "main", "recursive_test_app.get", "recursive_test_app.get"] | 0 | [] | The function (test_base_path_api_docs_on_good_app_schema) defined within the public class called public.The function start at line 109 and ends at 120. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 functions... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_base_path_api_docs_on_recursive_app_schema | def test_base_path_api_docs_on_recursive_app_schema():base_path = '/some/path'recursive_test_app = App(main({}, **{'pyramid_swagger.schema_directory':'tests/sample_schemas/recursive_app/external/','pyramid_swagger.base_path_api_docs':base_path}))recursive_test_app.get(base_path + '/swagger.json', status=200)recursive_t... | 1 | 12 | 0 | 72 | 2 | 123 | 135 | 123 | ['base_path', 'recursive_test_app'] | None | {"Assign": 2, "Expr": 4} | 6 | 13 | 6 | ["App", "main", "recursive_test_app.get", "recursive_test_app.get", "recursive_test_app.get", "recursive_test_app.get"] | 0 | [] | The function (test_base_path_api_docs_on_recursive_app_schema) defined within the public class called public.The function start at line 123 and ends at 135. It contains 12 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 func... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_base_path_api_docs_with_script_name_on_recursive_app_schema | def test_base_path_api_docs_with_script_name_on_recursive_app_schema():base_path = '/some/path'script_name = '/scriptname'test_app = App(main({}, **{'pyramid_swagger.schema_directory':'tests/sample_schemas/recursive_app/external/','pyramid_swagger.base_path_api_docs':base_path}),{'SCRIPT_NAME': script_name})test_app.ge... | 1 | 13 | 0 | 85 | 3 | 138 | 152 | 138 | ['test_app', 'base_path', 'script_name'] | None | {"Assign": 3, "Expr": 4} | 6 | 15 | 6 | ["App", "main", "test_app.get", "test_app.get", "test_app.get", "test_app.get"] | 0 | [] | The function (test_base_path_api_docs_with_script_name_on_recursive_app_schema) defined within the public class called public.The function start at line 138 and ends at 152. It contains 13 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It ... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_virtual_subpath | def test_virtual_subpath(settings):test_app = App(main({}, **settings), {'SCRIPT_NAME': '/subpath'})test_app.get('/subpath/swagger.json', status=200) | 1 | 3 | 1 | 34 | 1 | 155 | 157 | 155 | settings | ['test_app'] | None | {"Assign": 1, "Expr": 1} | 3 | 3 | 3 | ["App", "main", "test_app.get"] | 0 | [] | The function (test_virtual_subpath) defined within the public class called public.The function start at line 155 and ends at 157. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 funct... |
Yelp_pyramid_swagger | public | public | 0 | 0 | ini_app | def ini_app():settings = get_appsettings(os.path.join(os.path.dirname(__file__), 'app', 'config.ini'), name='main')# Swagger 1.2 tests are broken. Swagger 1.2 is deprecated and thus we have no plans to fix these tests,# so removing them here.settings["pyramid_swagger.swagger_versions"] = "2.0"return App(main({}, **sett... | 1 | 4 | 0 | 50 | 1 | 16 | 21 | 16 | ['settings'] | Returns | {"Assign": 2, "Return": 1} | 5 | 6 | 5 | ["get_appsettings", "os.path.join", "os.path.dirname", "App", "main"] | 0 | [] | The function (ini_app) defined within the public class called public.The function start at line 16 and ends at 21. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 5.0 functions, and It has 5.0 functions called... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_load_ini_settings | def test_load_ini_settings(ini_app):registry = ini_app.app.registrysettings = load_settings(registry)# Make sure these settings are booleansassert settings.validate_request is Trueassert settings.validate_response is Falseassert settings.validate_path is Trueassert settings.exclude_routes == {'/undefined/first', '/unde... | 1 | 9 | 1 | 64 | 2 | 24 | 34 | 24 | ini_app | ['settings', 'registry'] | None | {"Assign": 2} | 1 | 11 | 1 | ["load_settings"] | 0 | [] | The function (test_load_ini_settings) defined within the public class called public.The function start at line 24 and ends at 34. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 functio... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_get_swagger_versions | def test_get_swagger_versions(ini_app):settings = ini_app.app.registry.settingsswagger_versions = get_swagger_versions(settings)# Swagger 1.2 tests are broken. Swagger 1.2 is deprecated and thus we have no plans to fix these tests,# so removing them here.assert swagger_versions == {'2.0'} | 1 | 4 | 1 | 26 | 2 | 37 | 42 | 37 | ini_app | ['settings', 'swagger_versions'] | None | {"Assign": 2} | 1 | 6 | 1 | ["get_swagger_versions"] | 0 | [] | The function (test_get_swagger_versions) defined within the public class called public.The function start at line 37 and ends at 42. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 func... |
Yelp_pyramid_swagger | public | public | 0 | 0 | settings | def settings():dir_path = 'tests/sample_schemas/user_format/'return {'pyramid_swagger.schema_directory': dir_path,'pyramid_swagger.enable_request_validation': True,'pyramid_swagger.enable_swagger_spec_validation': True,} | 1 | 7 | 0 | 22 | 1 | 14 | 20 | 14 | ['dir_path'] | Returns | {"Assign": 1, "Return": 1} | 0 | 7 | 0 | [] | 37 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3613668_guillermooo_dart_sublime_bundle.execute_py.DartExecCommand.run", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3667502_braver_sidebartools.SideBar_py.get_setting", "_.content.gdrive.MyDrive.Phd_Thesis.Datase... | The function (settings) defined within the public class called public.The function start at line 14 and ends at 20. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It has 37.0 functions calling this function which are ["_.... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | user_format | def user_format():return SwaggerFormat(format='base64', to_wire=base64.b64encode, to_python=base64.b64decode, validate=base64.b64decode, description='base64') | 1 | 6 | 0 | 33 | 0 | 24 | 29 | 24 | [] | Returns | {"Return": 1} | 1 | 6 | 1 | ["SwaggerFormat"] | 0 | [] | The function (user_format) defined within the public class called public.The function start at line 24 and ends at 29. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It has 1.0 function calle... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | testapp_with_base64 | def testapp_with_base64(settings, user_format):"""Fixture for setting up a Swagger 2.0 version of the test testapp."""settings['pyramid_swagger.swagger_versions'] = ['2.0']settings['pyramid_swagger.user_formats'] = [user_format]return App(main({}, **settings)) | 1 | 4 | 2 | 36 | 0 | 33 | 37 | 33 | settings,user_format | [] | Returns | {"Assign": 2, "Expr": 1, "Return": 1} | 2 | 5 | 2 | ["App", "main"] | 0 | [] | The function (testapp_with_base64) defined within the public class called public.The function start at line 33 and ends at 37. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [33.0], and this function return a value. It declares 2.0 functions, and It has 2.0 f... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_user_format_happy_case | def test_user_format_happy_case(testapp_with_base64):response = testapp_with_base64.get('/sample/path_arg1/resource', params={'required_arg': 'MQ=='},)assert response.status_code == 200 | 1 | 4 | 1 | 28 | 1 | 40 | 43 | 40 | testapp_with_base64 | ['response'] | None | {"Assign": 1} | 1 | 4 | 1 | ["testapp_with_base64.get"] | 0 | [] | The function (test_user_format_happy_case) defined within the public class called public.The function start at line 40 and ends at 43. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 fu... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_user_format_failure_case | def test_user_format_failure_case(testapp_with_base64):# 'MQ' is not a valid base64 encoded string.with pytest.raises(Exception):testapp_with_base64.get('/sample/path_arg1/resource',params={'required_arg': 'MQ'},) | 1 | 4 | 1 | 28 | 0 | 46 | 50 | 46 | testapp_with_base64 | [] | None | {"Expr": 1, "With": 1} | 2 | 5 | 2 | ["pytest.raises", "testapp_with_base64.get"] | 0 | [] | The function (test_user_format_failure_case) defined within the public class called public.The function start at line 46 and ends at 50. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.... |
Yelp_pyramid_swagger | public | public | 0 | 0 | settings | def settings():dir_path = 'tests/sample_schemas/'return {'pyramid_swagger.schema_file': 'swagger.txt','pyramid_swagger.schema_directory': dir_path,'pyramid_swagger.enable_request_validation': True,'pyramid_swagger.enable_swagger_spec_validation': True,} | 1 | 8 | 0 | 26 | 1 | 14 | 21 | 14 | ['dir_path'] | Returns | {"Assign": 1, "Return": 1} | 0 | 8 | 0 | [] | 37 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3613668_guillermooo_dart_sublime_bundle.execute_py.DartExecCommand.run", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3667502_braver_sidebartools.SideBar_py.get_setting", "_.content.gdrive.MyDrive.Phd_Thesis.Datase... | The function (settings) defined within the public class called public.The function start at line 14 and ends at 21. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It has 37.0 functions calling this function which are ["_.... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | yaml_app | def yaml_app():return SwaggerFormat(format='base64', to_wire=base64.b64encode, to_python=base64.b64decode, validate=base64.b64decode, description='base64') | 1 | 6 | 0 | 33 | 0 | 25 | 30 | 25 | [] | Returns | {"Return": 1} | 1 | 6 | 1 | ["SwaggerFormat"] | 0 | [] | The function (yaml_app) defined within the public class called public.The function start at line 25 and ends at 30. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It has 1.0 function called i... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_invalid_file_extension | def test_invalid_file_extension(settings, yaml_app):"""Fixture for setting up a Swagger 2.0 version of the test testapp."""settings['pyramid_swagger.swagger_versions'] = ['2.0']settings['pyramid_swagger.user_formats'] = [yaml_app]with pytest.raises(Exception):App(main({}, **settings)) | 1 | 5 | 2 | 43 | 0 | 33 | 39 | 33 | settings,yaml_app | [] | None | {"Assign": 2, "Expr": 2, "With": 1} | 3 | 7 | 3 | ["pytest.raises", "App", "main"] | 0 | [] | The function (test_invalid_file_extension) defined within the public class called public.The function start at line 33 and ends at 39. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [33.0] and does not return any value. It declares 3.0 functions, and It has 3... |
Yelp_pyramid_swagger | public | public | 0 | 0 | settings | def settings():dir_path = 'tests/sample_schemas/prefer_20_routes_app/'return {'pyramid_swagger.schema_directory': dir_path,'pyramid_swagger.enable_request_validation': True,'pyramid_swagger.enable_swagger_spec_validation': True,# Swagger 1.2 tests are broken. Swagger 1.2 is deprecated and thus we have no plans to fix t... | 1 | 8 | 0 | 26 | 1 | 11 | 20 | 11 | ['dir_path'] | Returns | {"Assign": 1, "Return": 1} | 0 | 10 | 0 | [] | 37 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3613668_guillermooo_dart_sublime_bundle.execute_py.DartExecCommand.run", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3667502_braver_sidebartools.SideBar_py.get_setting", "_.content.gdrive.MyDrive.Phd_Thesis.Datase... | The function (settings) defined within the public class called public.The function start at line 11 and ends at 20. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It has 37.0 functions calling this function which are ["_.... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_app_with_no_prefer_conf | def test_app_with_no_prefer_conf(settings):"""Fixture for setting up a Swagger 2.0 version with no`prefer_20_routes` option added to settings."""return App(main({}, **settings)) | 1 | 2 | 1 | 18 | 0 | 24 | 27 | 24 | settings | [] | Returns | {"Expr": 1, "Return": 1} | 2 | 4 | 2 | ["App", "main"] | 0 | [] | The function (test_app_with_no_prefer_conf) defined within the public class called public.The function start at line 24 and ends at 27. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, and It has... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_app_with_prefer_conf | def test_app_with_prefer_conf(settings):"""Fixture for setting up a Swagger 2.0 version with a particular route`standard` added to `prefer_20_routes` option."""settings['pyramid_swagger.prefer_20_routes'] = ['standard']return App(main({}, **settings)) | 1 | 3 | 1 | 26 | 0 | 31 | 35 | 31 | settings | [] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 5 | 2 | ["App", "main"] | 0 | [] | The function (test_app_with_prefer_conf) defined within the public class called public.The function start at line 31 and ends at 35. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, and It has 2.... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_failure_with_no_prefer_config_case | def test_failure_with_no_prefer_config_case(test_app_with_no_prefer_conf):"""The second get call should fail as it is not covered in v2.0 spec"""response = test_app_with_no_prefer_conf.get('/sample/path_arg1/resource',params={'required_arg': 'a'},)assert response.status_code == 200with pytest.raises(Exception):test_app... | 1 | 7 | 1 | 49 | 1 | 38 | 46 | 38 | test_app_with_no_prefer_conf | ['response'] | None | {"Assign": 1, "Expr": 2, "With": 1} | 3 | 9 | 3 | ["test_app_with_no_prefer_conf.get", "pytest.raises", "test_app_with_no_prefer_conf.get"] | 0 | [] | The function (test_failure_with_no_prefer_config_case) defined within the public class called public.The function start at line 38 and ends at 46. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and ... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_success_with_prefer_config_case | def test_success_with_prefer_config_case(test_app_with_prefer_conf):response = test_app_with_prefer_conf.get('/sample/path_arg1/resource', params={'required_arg': 'a'},)assert response.status_code == 200response = test_app_with_prefer_conf.get('/sample/nonstring/1/1.1/true', params={},)assert response.status_code == 20... | 1 | 7 | 1 | 48 | 1 | 50 | 56 | 50 | test_app_with_prefer_conf | ['response'] | None | {"Assign": 2} | 3 | 7 | 3 | ["test_app_with_prefer_conf.get", "test_app_with_prefer_conf.get", "pytest.mark.skip"] | 0 | [] | The function (test_success_with_prefer_config_case) defined within the public class called public.The function start at line 50 and ends at 56. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It... |
Yelp_pyramid_swagger | public | public | 0 | 0 | settings | def settings():dir_path = 'tests/sample_schemas/recursive_app/external/'return {'pyramid_swagger.schema_directory': dir_path,'pyramid_swagger.enable_request_validation': True,'pyramid_swagger.enable_swagger_spec_validation': True,'pyramid_swagger.swagger_versions': ['2.0']} | 1 | 8 | 0 | 27 | 1 | 21 | 28 | 21 | ['dir_path'] | Returns | {"Assign": 1, "Return": 1} | 0 | 8 | 0 | [] | 37 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3613668_guillermooo_dart_sublime_bundle.execute_py.DartExecCommand.run", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3667502_braver_sidebartools.SideBar_py.get_setting", "_.content.gdrive.MyDrive.Phd_Thesis.Datase... | The function (settings) defined within the public class called public.The function start at line 21 and ends at 28. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It has 37.0 functions calling this function which are ["_.... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_app_deref | def test_app_deref(settings):"""Fixture for setting up a Swagger 2.0 version of the test test_apptest app serves swagger schemas with refs dereferenced."""settings['pyramid_swagger.dereference_served_schema'] = Truereturn App(main({}, **settings)) | 1 | 3 | 1 | 24 | 0 | 32 | 36 | 32 | settings | [] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 5 | 2 | ["App", "main"] | 0 | [] | The function (test_app_deref) defined within the public class called public.The function start at line 32 and ends at 36. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, and It has 2.0 functions... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_dereferenced_swagger_schema_bravado_client | def test_dereferenced_swagger_schema_bravado_client(schema_format,test_app_deref,):from bravado.client import SwaggerClientresponse = test_app_deref.get('/swagger.{0}'.format(schema_format))deserializer = DESERIALIZERS[schema_format]specs = deserializer(response)SwaggerClient.from_spec(specs) | 1 | 9 | 2 | 45 | 3 | 40 | 50 | 40 | schema_format,test_app_deref | ['specs', 'deserializer', 'response'] | None | {"Assign": 3, "Expr": 1} | 5 | 11 | 5 | ["test_app_deref.get", "format", "deserializer", "SwaggerClient.from_spec", "pytest.mark.parametrize"] | 0 | [] | The function (test_dereferenced_swagger_schema_bravado_client) defined within the public class called public.The function start at line 40 and ends at 50. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [40.0] and does not return any value. It declares 5.0 func... |
Yelp_pyramid_swagger | public | public | 0 | 0 | settings | def settings():dir_path = 'tests/sample_schemas/relative_ref/'return {'pyramid_swagger.schema_directory': dir_path,'pyramid_swagger.enable_request_validation': True,'pyramid_swagger.enable_swagger_spec_validation': True,'pyramid_swagger.swagger_versions': ['2.0']} | 1 | 8 | 0 | 27 | 1 | 24 | 31 | 24 | ['dir_path'] | Returns | {"Assign": 1, "Return": 1} | 0 | 8 | 0 | [] | 37 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3613668_guillermooo_dart_sublime_bundle.execute_py.DartExecCommand.run", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3667502_braver_sidebartools.SideBar_py.get_setting", "_.content.gdrive.MyDrive.Phd_Thesis.Datase... | The function (settings) defined within the public class called public.The function start at line 24 and ends at 31. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It has 37.0 functions calling this function which are ["_.... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_app | def test_app(settings):"""Fixture for setting up a Swagger 2.0 version of the test test_app."""return App(main({}, **settings)) | 1 | 2 | 1 | 18 | 0 | 35 | 37 | 35 | settings | [] | Returns | {"Expr": 1, "Return": 1} | 2 | 3 | 2 | ["App", "main"] | 0 | [] | The function (test_app) defined within the public class called public.The function start at line 35 and ends at 37. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, and It has 2.0 functions calle... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_app_deref | def test_app_deref(settings):"""Fixture for setting up a Swagger 2.0 version of the test test_apptest app serves swagger schemas with refs dereferenced."""settings['pyramid_swagger.dereference_served_schema'] = Truereturn App(main({}, **settings)) | 1 | 3 | 1 | 24 | 0 | 41 | 45 | 41 | settings | [] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 5 | 2 | ["App", "main"] | 0 | [] | The function (test_app_deref) defined within the public class called public.The function start at line 41 and ends at 45. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, and It has 2.0 functions... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_running_query_for_relative_ref | def test_running_query_for_relative_ref(test_app):response = test_app.get('/sample/path_arg1/resource', params={},)assert response.status_code == 200 | 1 | 3 | 1 | 25 | 1 | 48 | 50 | 48 | test_app | ['response'] | None | {"Assign": 1} | 1 | 3 | 1 | ["test_app.get"] | 0 | [] | The function (test_running_query_for_relative_ref) defined within the public class called public.The function start at line 48 and ends at 50. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It ha... |
Yelp_pyramid_swagger | public | public | 0 | 0 | translate_ref_extension | def translate_ref_extension(ref, schema_format):if schema_format == 'json':return ref# all refs are already yamlreturn ref.replace('.json', '.%s' % schema_format) | 2 | 4 | 2 | 25 | 0 | 53 | 56 | 53 | ref,schema_format | [] | Returns | {"If": 1, "Return": 2} | 1 | 4 | 1 | ["ref.replace"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95056683_Yelp_pyramid_swagger.tests.acceptance.relative_ref_test_py.recursively_rewrite_refs"] | The function (translate_ref_extension) defined within the public class called public.The function start at line 53 and ends at 56. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [53.0], and this function return a value. It declare 1.0 function, It has 1.0 func... |
Yelp_pyramid_swagger | public | public | 0 | 0 | recursively_rewrite_refs | def recursively_rewrite_refs(schema_item, schema_format):"""Fix a schema's refs so that they all read the same format. Ensures thatconsumers requesting a yaml resource don't have to know how to read json."""if isinstance(schema_item, dict):for key, value in schema_item.items():if key == '$ref':schema_item[key] = transl... | 6 | 12 | 2 | 71 | 0 | 59 | 74 | 59 | schema_item,schema_format | [] | None | {"Assign": 1, "Expr": 3, "For": 2, "If": 3} | 6 | 16 | 6 | ["isinstance", "schema_item.items", "translate_ref_extension", "recursively_rewrite_refs", "isinstance", "recursively_rewrite_refs"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95056683_Yelp_pyramid_swagger.tests.acceptance.relative_ref_test_py.recursively_rewrite_refs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95056683_Yelp_pyramid_swagger.tests.acceptance.relative_ref_test_py.test_s... | The function (recursively_rewrite_refs) defined within the public class called public.The function start at line 59 and ends at 74. It contains 12 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [59.0] and does not return any value. It declares 6.0 functions, It has 6.0 func... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_swagger_schema_retrieval | def test_swagger_schema_retrieval(schema_format, test_app):here = os.path.dirname(__file__)deserializer = DESERIALIZERS[schema_format]expected_files = ['parameters/common','paths/common','responses/common','swagger',]for expected_file in expected_files:response = test_app.get('/{0}.{1}'.format(expected_file, schema_for... | 2 | 26 | 2 | 120 | 7 | 78 | 108 | 78 | schema_format,test_app | ['actual_dict', 'gold_path_parts', 'here', 'response', 'deserializer', 'expected_dict', 'expected_files'] | None | {"Assign": 7, "Expr": 1, "For": 1, "With": 1} | 10 | 31 | 10 | ["os.path.dirname", "test_app.get", "format", "format", "open", "os.path.join", "json.load", "recursively_rewrite_refs", "deserializer", "pytest.mark.parametrize"] | 0 | [] | The function (test_swagger_schema_retrieval) defined within the public class called public.The function start at line 78 and ends at 108. It contains 26 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [78.0] and does not return any value. It declares 10.0 functions, and It ... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_swagger_schema_retrieval_is_not_dereferenced | def test_swagger_schema_retrieval_is_not_dereferenced(schema_format, test_app):response = test_app.get('/swagger.{0}'.format(schema_format))here = os.path.dirname(__file__)swagger_path_parts = [here,'..','sample_schemas','relative_ref','dereferenced_swagger.json']dereferenced_swagger_path = os.path.join(*swagger_path_p... | 1 | 17 | 2 | 95 | 7 | 112 | 132 | 112 | schema_format,test_app | ['swagger_path_parts', 'actual_dict', 'here', 'dereferenced_swagger_path', 'response', 'deserializer', 'expected_dict'] | None | {"Assign": 7, "With": 1} | 9 | 21 | 9 | ["test_app.get", "format", "os.path.dirname", "os.path.join", "open", "json.load", "deserializer", "json.dumps", "pytest.mark.parametrize"] | 0 | [] | The function (test_swagger_schema_retrieval_is_not_dereferenced) defined within the public class called public.The function start at line 112 and ends at 132. It contains 17 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [112.0] and does not return any value. It declares 9.... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_dereferenced_swagger_schema_retrieval | def test_dereferenced_swagger_schema_retrieval(schema_format, test_app_deref):response = test_app_deref.get('/swagger.{0}'.format(schema_format))here = os.path.dirname(__file__)swagger_path_parts = [here,'..','sample_schemas','relative_ref','dereferenced_swagger.json']dereferenced_swagger_path = os.path.join(*swagger_p... | 2 | 19 | 2 | 117 | 8 | 136 | 165 | 136 | schema_format,test_app_deref | ['swagger_path_parts', 'actual_dict', 'ref_pattern', 'here', 'dereferenced_swagger_path', 'response', 'deserializer', 'expected_dict'] | None | {"Assign": 8, "If": 1, "With": 1} | 11 | 30 | 11 | ["test_app_deref.get", "format", "os.path.dirname", "os.path.join", "open", "json.load", "deserializer", "re.compile", "ref_pattern.findall", "json.dumps", "pytest.mark.parametrize"] | 0 | [] | The function (test_dereferenced_swagger_schema_retrieval) defined within the public class called public.The function start at line 136 and ends at 165. It contains 19 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [136.0] and does not return any value. It declares 11.0 func... |
Yelp_pyramid_swagger | public | public | 0 | 0 | build_test_app | def build_test_app(swagger_versions, **overrides):"""Fixture for setting up a test test_app with particular settings."""from tests.acceptance.app import mainfrom webtest import TestApp as Appsettings = dict({'pyramid_swagger.schema_directory': 'tests/sample_schemas/good_app/','pyramid_swagger.enable_request_validation'... | 1 | 12 | 2 | 64 | 1 | 15 | 28 | 15 | swagger_versions,**overrides | ['settings'] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 3 | 14 | 3 | ["dict", "App", "main"] | 13 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95056683_Yelp_pyramid_swagger.tests.acceptance.request_test_py.test_200_skip_validation_when_disabled", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95056683_Yelp_pyramid_swagger.tests.acceptance.request_test_py.te... | The function (build_test_app) defined within the public class called public.The function start at line 15 and ends at 28. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [15.0], and this function return a value. It declares 3.0 functions, It has 3.0 functions ... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_app | def test_app(request):"""Fixture for setting up a test test_app with particular settings."""return build_test_app(swagger_versions=request.param,) | 1 | 4 | 1 | 16 | 0 | 38 | 42 | 38 | request | [] | Returns | {"Expr": 1, "Return": 1} | 2 | 5 | 2 | ["build_test_app", "pytest.fixture"] | 0 | [] | The function (test_app) defined within the public class called public.The function start at line 38 and ends at 42. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, and It has 2.0 functions calle... |
Yelp_pyramid_swagger | public | public | 0 | 0 | validation_context | def validation_context(request, response=None):try:yieldexcept (exceptions.RequestValidationError,exceptions.ResponseValidationError,exceptions.PathNotFoundError,):raise exception_response(206)except Exception:raise exception_response(400) | 3 | 11 | 2 | 41 | 0 | 46 | 56 | 46 | request,response | [] | None | {"Expr": 1, "Try": 1} | 2 | 11 | 2 | ["exception_response", "exception_response"] | 8 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69279284_espressif_idf_component_manager.idf_component_tools.manager_py.ManifestManager.validate", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69279284_espressif_idf_component_manager.tests.manifest.test_validator... | The function (validation_context) defined within the public class called public.The function start at line 46 and ends at 56. It contains 11 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [46.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions ... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_echo_date_with_pyramid_swagger_renderer | def test_echo_date_with_pyramid_swagger_renderer(test_app):input_object = {'date': datetime.date.today().isoformat()}response = test_app.post_json('/echo_date', input_object)# If the request is served via Swagger1.2assert response.status_code == 200assert response.json == input_object | 1 | 5 | 1 | 44 | 2 | 62 | 69 | 62 | test_app | ['input_object', 'response'] | None | {"Assign": 2} | 3 | 8 | 3 | ["isoformat", "datetime.date.today", "test_app.post_json"] | 0 | [] | The function (test_echo_date_with_pyramid_swagger_renderer) defined within the public class called public.The function start at line 62 and ends at 69. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions,... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_echo_date_with_json_renderer | def test_echo_date_with_json_renderer(test_app):today = datetime.date.today()input_object = {'date': today.isoformat()}exc = Noneresponse = Nonetry:response = test_app.post_json('/echo_date_json_renderer', input_object)except TypeError as exception:exc = exceptionserved_swagger_versions = test_app.app.registry.settings... | 3 | 15 | 1 | 96 | 5 | 72 | 92 | 72 | test_app | ['exc', 'served_swagger_versions', 'today', 'input_object', 'response'] | None | {"Assign": 7, "If": 1, "Try": 1} | 4 | 21 | 4 | ["datetime.date.today", "today.isoformat", "test_app.post_json", "format"] | 0 | [] | The function (test_echo_date_with_json_renderer) defined within the public class called public.The function start at line 72 and ends at 92. It contains 15 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 4.0 functions, and It h... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_post_endpoint_with_optional_body | def test_post_endpoint_with_optional_body(test_app, body, expected_length):assert test_app.post_json('/post_endpoint_with_optional_body', body).json == expected_length | 1 | 2 | 3 | 22 | 0 | 102 | 103 | 102 | test_app,body,expected_length | [] | None | {} | 2 | 2 | 2 | ["test_app.post_json", "pytest.mark.parametrize"] | 0 | [] | The function (test_post_endpoint_with_optional_body) defined within the public class called public.The function start at line 102 and ends at 103. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [102.0] and does not return any value. It declares 2.0 functions, ... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_200_with_form_params | def test_200_with_form_params(test_app):assert test_app.post('/post_with_form_params',{'form_param': 42},).status_code == 200 | 1 | 5 | 1 | 23 | 0 | 106 | 110 | 106 | test_app | [] | None | {} | 1 | 5 | 1 | ["test_app.post"] | 0 | [] | The function (test_200_with_form_params) defined within the public class called public.The function start at line 106 and ends at 110. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 fu... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_200_with_file_upload | def test_200_with_file_upload(test_app):assert test_app.post('/post_with_file_upload',upload_files=[('photo_file', 'photo.jpg', b'<binary data goes here>')],).status_code == 200 | 1 | 5 | 1 | 30 | 0 | 113 | 117 | 113 | test_app | [] | None | {} | 1 | 5 | 1 | ["test_app.post"] | 0 | [] | The function (test_200_with_file_upload) defined within the public class called public.The function start at line 113 and ends at 117. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 fu... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_400_with_form_params_wrong_type | def test_400_with_form_params_wrong_type(test_app):assert test_app.post('/post_with_form_params',{'form_param': "not a number"},expect_errors=True,).status_code == 400 | 1 | 6 | 1 | 27 | 0 | 120 | 125 | 120 | test_app | [] | None | {} | 1 | 6 | 1 | ["test_app.post"] | 0 | [] | The function (test_400_with_form_params_wrong_type) defined within the public class called public.The function start at line 120 and ends at 125. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_400_if_json_body_for_form_parms | def test_400_if_json_body_for_form_parms(test_app):assert test_app.post_json('/post_with_form_params',{'form_param': 42},expect_errors=True,).status_code == 400 | 1 | 6 | 1 | 27 | 0 | 128 | 133 | 128 | test_app | [] | None | {} | 1 | 6 | 1 | ["test_app.post_json"] | 0 | [] | The function (test_400_if_json_body_for_form_parms) defined within the public class called public.The function start at line 128 and ends at 133. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_400_if_required_query_args_absent | def test_400_if_required_query_args_absent(test_app):assert test_app.get('/sample/path_arg1/resource',expect_errors=True,).status_code == 400 | 1 | 5 | 1 | 21 | 0 | 136 | 140 | 136 | test_app | [] | None | {} | 1 | 5 | 1 | ["test_app.get"] | 0 | [] | The function (test_400_if_required_query_args_absent) defined within the public class called public.The function start at line 136 and ends at 140. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and ... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_200_if_optional_query_args_absent | def test_200_if_optional_query_args_absent(test_app):assert test_app.get('/sample/path_arg1/resource',params={'required_arg': 'test'},# no `optional_arg` arg).status_code == 200 | 1 | 5 | 1 | 25 | 0 | 143 | 147 | 143 | test_app | [] | None | {} | 1 | 5 | 1 | ["test_app.get"] | 0 | [] | The function (test_200_if_optional_query_args_absent) defined within the public class called public.The function start at line 143 and ends at 147. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and ... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_200_if_request_arg_is_wrong_type | def test_200_if_request_arg_is_wrong_type(test_app):assert test_app.get('/sample/path_arg1/resource',params={'required_arg': 1.0},).status_code == 200 | 1 | 5 | 1 | 27 | 0 | 150 | 154 | 150 | test_app | [] | None | {} | 1 | 5 | 1 | ["test_app.get"] | 0 | [] | The function (test_200_if_request_arg_is_wrong_type) defined within the public class called public.The function start at line 150 and ends at 154. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and I... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_200_if_request_arg_types_are_not_strings | def test_200_if_request_arg_types_are_not_strings(test_app):assert test_app.get('/get_with_non_string_query_args',params={'int_arg': '5','float_arg': '3.14','boolean_arg': 'true',},).status_code == 200 | 1 | 9 | 1 | 34 | 0 | 157 | 165 | 157 | test_app | [] | None | {} | 1 | 9 | 1 | ["test_app.get"] | 0 | [] | The function (test_200_if_request_arg_types_are_not_strings) defined within the public class called public.The function start at line 157 and ends at 165. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_404_if_path_not_in_swagger | def test_404_if_path_not_in_swagger(test_app):assert test_app.get('/undefined/path',expect_errors=True,).status_code == 404 | 1 | 5 | 1 | 21 | 0 | 168 | 172 | 168 | test_app | [] | None | {} | 1 | 5 | 1 | ["test_app.get"] | 0 | [] | The function (test_404_if_path_not_in_swagger) defined within the public class called public.The function start at line 168 and ends at 172. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has ... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_200_skip_validation_with_excluded_path | def test_200_skip_validation_with_excluded_path():app = build_test_app(swagger_versions=['2.0'],**{'pyramid_swagger.exclude_paths': [r'^/undefined/path']})assert app.get('/undefined/path').status_code == 200 | 1 | 6 | 0 | 35 | 1 | 175 | 180 | 175 | ['app'] | None | {"Assign": 1} | 2 | 6 | 2 | ["build_test_app", "app.get"] | 0 | [] | The function (test_200_skip_validation_with_excluded_path) defined within the public class called public.The function start at line 175 and ends at 180. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions... | |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_400_if_request_arg_is_wrong_type_but_not_castable | def test_400_if_request_arg_is_wrong_type_but_not_castable(test_app):assert test_app.get('/get_with_non_string_query_args',params={'float_arg': 'foobar'},expect_errors=True,).status_code == 400 | 1 | 6 | 1 | 29 | 0 | 183 | 188 | 183 | test_app | [] | None | {} | 1 | 6 | 1 | ["test_app.get"] | 0 | [] | The function (test_400_if_request_arg_is_wrong_type_but_not_castable) defined within the public class called public.The function start at line 183 and ends at 188. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0... |
Yelp_pyramid_swagger | public | public | 0 | 0 | test_400_if_path_arg_not_valid_enum | def test_400_if_path_arg_not_valid_enum(test_app):assert test_app.get('/sample/invalid_arg/resource',params={'required_arg': 'test'},expect_errors=True,).status_code == 400 | 1 | 6 | 1 | 29 | 0 | 191 | 196 | 191 | test_app | [] | None | {} | 1 | 6 | 1 | ["test_app.get"] | 0 | [] | The function (test_400_if_path_arg_not_valid_enum) defined within the public class called public.The function start at line 191 and ends at 196. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.