import os os.environ["DB_HOST"] = "192.168.0.10" os.environ["DB_NAME"] = "CertDB" os.environ["DB_USER"] = "CertUser" os.environ["DB_PASSWORD"] = "CertPWD" os.environ["DB_PORT"] = "55432" os.environ["LOG_DIR"] = "./logs" from app.app import app import pytest @pytest.fixture def client(): app.config["TESTING"] = True with app.test_client() as client: yield client def test_app_exists(): assert app is not None def test_protected_videos_requires_login(client): response = client.get("/videos/A1.mp4", follow_redirects=False) assert response.status_code in (302, 401, 403)