style: apply black formatting to test_config.py
Agent-Logs-Url: https://github.com/christianlouis/dmarq/sessions/a0201223-b428-496d-90c7-cd268fee7774 Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -16,9 +16,7 @@ class TestBackendCorsOriginsValidator:
|
|||||||
|
|
||||||
def test_comma_separated_string(self):
|
def test_comma_separated_string(self):
|
||||||
"""Comma-separated origins are split into a list."""
|
"""Comma-separated origins are split into a list."""
|
||||||
settings = Settings(
|
settings = Settings(BACKEND_CORS_ORIGINS="http://localhost:3000,http://localhost:5173")
|
||||||
BACKEND_CORS_ORIGINS="http://localhost:3000,http://localhost:5173"
|
|
||||||
)
|
|
||||||
assert settings.BACKEND_CORS_ORIGINS == [
|
assert settings.BACKEND_CORS_ORIGINS == [
|
||||||
"http://localhost:3000",
|
"http://localhost:3000",
|
||||||
"http://localhost:5173",
|
"http://localhost:5173",
|
||||||
@@ -53,9 +51,7 @@ class TestBackendCorsOriginsValidator:
|
|||||||
|
|
||||||
def test_comma_separated_with_spaces(self):
|
def test_comma_separated_with_spaces(self):
|
||||||
"""Extra whitespace around origins is stripped."""
|
"""Extra whitespace around origins is stripped."""
|
||||||
settings = Settings(
|
settings = Settings(BACKEND_CORS_ORIGINS=" http://a.example.com , http://b.example.com ")
|
||||||
BACKEND_CORS_ORIGINS=" http://a.example.com , http://b.example.com "
|
|
||||||
)
|
|
||||||
assert settings.BACKEND_CORS_ORIGINS == [
|
assert settings.BACKEND_CORS_ORIGINS == [
|
||||||
"http://a.example.com",
|
"http://a.example.com",
|
||||||
"http://b.example.com",
|
"http://b.example.com",
|
||||||
|
|||||||
Reference in New Issue
Block a user