def configure_type(request): """Return /configure/type :param request: a web requeest object. :type request: request | None """ log.info("Request for configuration type made.") return web.json_response(backend.determine_config_type())
def test_determine_config_type(tmpdir): # Ensure the default created config is of simple type workspace = tmpdir.strpath temp_config_path = workspace + '/config.yaml' make_default_config_if_needed(temp_config_path) got_output = backend.determine_config_type(config_path=temp_config_path) expected_output = { 'message': '', 'type': 'minimal', } assert got_output == expected_output
def test_determine_config_type(tmpdir): # Create a temp config workspace = tmpdir.strpath temp_config_path = workspace + '/config.yaml' got_output = backend.determine_config_type(config_path=temp_config_path) expected_output = { 'message': '', 'type': 'minimal', } assert got_output == expected_output