File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,9 +26,21 @@ def test_initialization_with_invalid_way_type(self):
2626
2727 def test_initialization_with_invalid_amount (self ):
2828 """
29- Test initialization with invalid amounts (less than 0, equal to 0, greater than 1)
29+ Test initialization with invalid amounts (less than 0 or greater than 1)
30+ and valid boundary amounts (0 and 1)
3031 """
3132 valid_way_type = PossibleWayType .list_all ()[0 ]
33+
34+ way_type_zero = WayType (valid_way_type , 0 )
35+ self .assertIsInstance (way_type_zero , WayType )
36+ self .assertEqual (way_type_zero .type , valid_way_type )
37+ self .assertEqual (way_type_zero .amount , 0 )
38+
39+ way_type_one = WayType (valid_way_type , 1 )
40+ self .assertIsInstance (way_type_one , WayType )
41+ self .assertEqual (way_type_one .type , valid_way_type )
42+ self .assertEqual (way_type_one .amount , 1 )
43+
3244 for amount in [- 1 , 2 ]:
3345 with self .assertRaises (ValueError ):
3446 WayType (valid_way_type , amount )
You can’t perform that action at this time.
0 commit comments