Files
soleprint/station/tools/tester/tests/_dev/test_health.py
2025-12-24 05:38:37 -03:00

30 lines
970 B
Python

"""
Development Test: Health Check
Minimal test to verify tester is working when backend tests aren't available.
Tests basic HTTP connectivity and authentication flow.
"""
from ..base import ContractTestCase
from ..endpoints import Endpoints
class TestHealth(ContractTestCase):
"""Basic health and connectivity tests"""
def test_can_connect_to_base_url(self):
"""Verify we can connect to the configured URL"""
# This just ensures httpx and base URL work
try:
response = self.get("/health/")
except Exception as e:
self.skipTest(f"Cannot connect to {self.base_url}: {e}")
# If we got here, connection worked
self.assertIsNotNone(response)
def test_token_authentication(self):
"""Verify token authentication is configured"""
# Just checks that we have a token (either from env or fetch)
self.assertIsNotNone(self.token, "No authentication token available")