Skip to content

Commit 3c4307a

Browse files
Pass env_vars fixture to tests that are missing it
1 parent 0cca530 commit 3c4307a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/utils/test_auth.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def test_password_hashing() -> None:
3737
assert not verify_password("wrong_password", hashed)
3838

3939

40-
def test_token_creation_and_validation() -> None:
40+
def test_token_creation_and_validation(env_vars) -> None:
4141
data = {"sub": "[email protected]"}
4242

4343
# Test access token
@@ -55,15 +55,15 @@ def test_token_creation_and_validation() -> None:
5555
assert decoded["type"] == "refresh"
5656

5757

58-
def test_expired_token() -> None:
58+
def test_expired_token(env_vars) -> None:
5959
data = {"sub": "[email protected]"}
6060
expired_delta = timedelta(minutes=-10)
6161
expired_token = create_access_token(data, expired_delta)
6262
decoded = validate_token(expired_token, "access")
6363
assert decoded is None
6464

6565

66-
def test_invalid_token_type() -> None:
66+
def test_invalid_token_type(env_vars) -> None:
6767
data = {"sub": "[email protected]"}
6868
access_token = create_access_token(data)
6969
decoded = validate_token(access_token, "refresh")

tests/utils/test_db.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from utils.core.models import Role, Permission, Organization, RolePermissionLink, ValidPermissions
1313
from tests.conftest import SetupError
1414

15-
def test_get_connection_url():
15+
def test_get_connection_url(env_vars):
1616
"""Test that get_connection_url returns a valid URL object"""
1717
url = get_connection_url()
1818
assert url.drivername == "postgresql"

0 commit comments

Comments
 (0)