Merge pull request #29 from christianlouis/copilot/fix-black-formatting-issues
fix: remove unused pytest import from test_config.py
This commit is contained in:
@@ -6,8 +6,6 @@ previously caused a JSONDecodeError in pydantic_settings v2 before validators
|
||||
could run (see: pydantic_settings sources/providers/env.py decode_complex_value).
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
from app.core.config import Settings
|
||||
|
||||
|
||||
@@ -16,9 +14,7 @@ class TestBackendCorsOriginsValidator:
|
||||
|
||||
def test_comma_separated_string(self):
|
||||
"""Comma-separated origins are split into a list."""
|
||||
settings = Settings(
|
||||
BACKEND_CORS_ORIGINS="http://localhost:3000,http://localhost:5173"
|
||||
)
|
||||
settings = Settings(BACKEND_CORS_ORIGINS="http://localhost:3000,http://localhost:5173")
|
||||
assert settings.BACKEND_CORS_ORIGINS == [
|
||||
"http://localhost:3000",
|
||||
"http://localhost:5173",
|
||||
@@ -53,9 +49,7 @@ class TestBackendCorsOriginsValidator:
|
||||
|
||||
def test_comma_separated_with_spaces(self):
|
||||
"""Extra whitespace around origins is stripped."""
|
||||
settings = Settings(
|
||||
BACKEND_CORS_ORIGINS=" http://a.example.com , http://b.example.com "
|
||||
)
|
||||
settings = Settings(BACKEND_CORS_ORIGINS=" http://a.example.com , http://b.example.com ")
|
||||
assert settings.BACKEND_CORS_ORIGINS == [
|
||||
"http://a.example.com",
|
||||
"http://b.example.com",
|
||||
|
||||
Reference in New Issue
Block a user