66"""
77
88from app .schemas .translation import HealthResponse , ErrorResponse
9+ from app .version import __version__
910
1011
1112class TestHealthResponse :
@@ -15,7 +16,7 @@ def test_health_response_minimal(self):
1516 """Test HealthResponse with minimal data."""
1617 response = HealthResponse (status = "healthy" )
1718 assert response .status == "healthy"
18- assert response .version == "1.0.0"
19+ assert response .version == __version__
1920
2021 def test_health_response_full (self ):
2122 """Test HealthResponse with all fields."""
@@ -33,24 +34,24 @@ def test_health_response_different_statuses(self):
3334
3435 def test_health_response_model_dump (self ):
3536 """Test HealthResponse model_dump method."""
36- response = HealthResponse (status = "healthy" , version = "1.0.0" )
37+ response = HealthResponse (status = "healthy" , version = __version__ )
3738 data = response .model_dump ()
3839 assert data ["status" ] == "healthy"
39- assert data ["version" ] == "1.0.0"
40+ assert data ["version" ] == __version__
4041
4142 def test_health_response_model_dump_json (self ):
4243 """Test HealthResponse model_dump_json method."""
43- response = HealthResponse (status = "healthy" , version = "1.0.0" )
44+ response = HealthResponse (status = "healthy" , version = __version__ )
4445 json_str = response .model_dump_json ()
4546 assert "healthy" in json_str
46- assert "1.0.0" in json_str
47+ assert __version__ in json_str
4748
4849 def test_health_response_from_dict (self ):
4950 """Test HealthResponse from dictionary."""
50- data = {"status" : "healthy" , "version" : "1.0.0" }
51+ data = {"status" : "healthy" , "version" : __version__ }
5152 response = HealthResponse (** data )
5253 assert response .status == "healthy"
53- assert response .version == "1.0.0"
54+ assert response .version == __version__
5455
5556
5657class TestErrorResponse :
0 commit comments