def test_it_adds_all_request_methods_when_not_defined(self): settings = cors_json_view() assert settings['request_method'] == ('DELETE', 'GET', 'HEAD', 'POST', 'PUT', 'OPTIONS')
def test_it_sets_cors_decorator(self, cors_policy): settings = cors_json_view() assert settings['decorator'] == cors_policy
def test_it_adds_OPTIONS_to_allowed_request_methods(self): settings = cors_json_view(request_method='POST') assert settings['request_method'] == ('POST', 'OPTIONS')
def test_it_uses_json_view(self, json_view): json_view.side_effect = None settings = cors_json_view() assert settings == json_view.return_value