Skip to content

Commit

Permalink
pass allow origins at settings_for_test
Browse files Browse the repository at this point in the history
  • Loading branch information
sushichan044 committed Jun 28, 2024
1 parent 0b7aea5 commit d72319e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ class CORSSettingsFactory(ModelFactory[CORSSettings]):
allow_credentials = True
allow_methods = ["GET"]
allow_headers = ["*"]
allow_origins = ["http://allowed.example"]
allow_origins = ["*"]

return CORSSettingsFactory

Expand Down Expand Up @@ -348,7 +348,7 @@ def settings_for_test(
postgres_storage_settings_factory: Type[ModelFactory[PostgresStorageSettings]],
) -> Generator[GlobalSettings, None, None]:
yield global_settings_factory.build(
cors_settings=cors_settings_factory.build(),
cors_settings=cors_settings_factory.build(allow_origins=["http://allowed.example.com"]),
storage_settings=postgres_storage_settings_factory.build(database=TEST_DATABASE_NAME),
)

Expand Down

0 comments on commit d72319e

Please sign in to comment.