File tree 1 file changed +3
-10
lines changed 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,6 @@ def test_route_valid_no_threshold():
64
64
assert route .name == "Test Route"
65
65
assert route .references == ["reference1" , "reference2" ]
66
66
assert route .metadata == {"key" : "value" }
67
- assert route .distance_threshold is None
68
67
69
68
70
69
def test_route_invalid_threshold_zero ():
@@ -108,18 +107,12 @@ def test_distance_aggregation_method():
108
107
109
108
110
109
def test_routing_config_valid ():
111
- config = RoutingConfig (distance_threshold = 0.6 , max_k = 5 )
112
- assert config .distance_threshold == 0.6
110
+ config = RoutingConfig (aggregation_method = DistanceAggregationMethod . min , max_k = 5 )
111
+ assert config .aggregation_method == DistanceAggregationMethod ( "min" )
113
112
assert config .max_k == 5
114
113
115
114
116
115
def test_routing_config_invalid_max_k ():
117
116
with pytest .raises (ValidationError ) as excinfo :
118
- RoutingConfig (distance_threshold = 0.6 , max_k = 0 )
117
+ RoutingConfig (max_k = 0 )
119
118
assert "max_k must be a positive integer" in str (excinfo .value )
120
-
121
-
122
- def test_routing_config_invalid_distance_threshold ():
123
- with pytest .raises (ValidationError ) as excinfo :
124
- RoutingConfig (distance_threshold = 1.5 , max_k = 5 )
125
- assert "distance_threshold must be between 0 and 1" in str (excinfo .value )
You can’t perform that action at this time.
0 commit comments