diff --git a/tests/core/resource/test_views_cors.py b/tests/core/resource/test_views_cors.py index 427fa78a7..b8d5eaf77 100644 --- a/tests/core/resource/test_views_cors.py +++ b/tests/core/resource/test_views_cors.py @@ -15,7 +15,7 @@ class CORSOriginHeadersTest(BaseWebTest, unittest.TestCase): def setUpClass(cls): super().setUpClass() cls.headers["Origin"] = "notmyidea.org" - + @classmethod def tearDownClass(cls): cls.headers.pop("Origin", None) @@ -102,6 +102,7 @@ def test_present_on_http_error(self): response = self.app.get("/mushrooms", headers=self.headers, status=402) self.assertIn("Access-Control-Allow-Origin", response.headers) + class CORSExposeHeadersTest(BaseWebTest, unittest.TestCase): def assert_expose_headers(self, method, path, allowed_headers, body=None, status=None): headers = {**self.headers, "Origin": "lolnet.org"} @@ -219,7 +220,7 @@ class CORSMaxAgeTest(BaseWebTest, unittest.TestCase): def setUpClass(cls): super().setUpClass() cls.headers.update({"Origin": "lolnet.org", "Access-Control-Request-Method": "GET"}) - + @classmethod def tearDownClass(cls): cls.headers.pop("Access-Control-Request-Method", None) @@ -239,4 +240,3 @@ def test_cors_max_age_is_disabled_if_unset(self): app = self.make_app({"cors_max_age_seconds": ""}) resp = app.options("/", headers=self.headers) self.assertNotIn("Access-Control-Max-Age", resp.headers) -