Files
ss-tools/backend/tests/test_models.py
root 632b730fff chore: migrate GRACE-Poly anchors to hierarchical dotted naming
Systematic rename of all semantic anchors (#region, [DEF], @RELATION)
across 1400+ files — backend Python, frontend Svelte/TS, specs, docs:
- Flat anchors become Namespace.Module.Entity
- @RELATION references updated to match new anchor paths
- Zero business logic changes
2026-07-22 11:48:15 +03:00

27 lines
1.1 KiB
Python

# #region Test.Models.Environment [C:2] [TYPE Module] [SEMANTICS test,environment,config,model]
# @BRIEF Verify Environment config model stores and returns values correctly.
# @RELATION BINDS_TO -> [Environment]
# @TEST_EDGE: default_values -> Defaults are set correctly
# @TEST_EDGE: missing_field -> Raises ValidationError for missing required field
# @TEST_EDGE: invalid_type -> Raises ValidationError for wrong type
from src.core.config_models import Environment
from src.core.logger import belief_scope
# #region Test.Models.TestEnvironmentModel [C:2] [TYPE Function]
# @BRIEF Verify Environment model correctly stores and returns attribute values.
def test_environment_model():
with belief_scope("test_environment_model"):
env = Environment(
id="test-id",
name="test-env",
url="http://localhost:8088/api/v1",
username="admin",
password="password"
)
assert env.id == "test-id"
assert env.name == "test-env"
assert env.url == "http://localhost:8088/api/v1"
# #endregion Test.Models.TestEnvironmentModel
# #endregion Test.Models.Environment