Fix CI integration test rate limiting
- Add auth_intensive marker for tests that make many login requests - Mark all tests in test_auth_api.py with auth_intensive - Exclude auth_intensive tests from CI integration runs against deployed environments (they trigger 429 rate limiting) - Remove duplicate TestSecurityEdgeCases class definition - Register auth_intensive, integration, large, slow markers in conftest.py
This commit is contained in:
@@ -9,6 +9,33 @@ This module provides:
|
||||
|
||||
import os
|
||||
import pytest
|
||||
|
||||
|
||||
# =============================================================================
|
||||
# Pytest Markers
|
||||
# =============================================================================
|
||||
|
||||
|
||||
def pytest_configure(config):
|
||||
"""Register custom pytest markers."""
|
||||
config.addinivalue_line(
|
||||
"markers",
|
||||
"auth_intensive: marks tests that make many login requests (excluded from CI integration tests due to rate limiting)",
|
||||
)
|
||||
config.addinivalue_line(
|
||||
"markers",
|
||||
"integration: marks tests as integration tests",
|
||||
)
|
||||
config.addinivalue_line(
|
||||
"markers",
|
||||
"large: marks tests that handle large files (slow)",
|
||||
)
|
||||
config.addinivalue_line(
|
||||
"markers",
|
||||
"slow: marks tests as slow running",
|
||||
)
|
||||
|
||||
|
||||
import io
|
||||
from typing import Generator
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
Reference in New Issue
Block a user