Skip to content

Commit

Permalink
ran format
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcottner committed Apr 1, 2024
1 parent c6821ec commit c7850b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/core/resource/test_views_cors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"}
Expand Down Expand Up @@ -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)
Expand All @@ -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)

0 comments on commit c7850b3

Please sign in to comment.