@@ -17,31 +17,25 @@ class TestGetStatusOrder:
1717 def test_open (self ):
1818 assert get_status_order ("Open" ) == 0
1919
20- def test_in_progress (self ):
21- assert get_status_order ("In Progress" ) == 1
22-
23- def test_stalled (self ):
24- assert get_status_order ("Stalled" ) == 2
25-
26- def test_resolved (self ):
27- assert get_status_order ("Resolved" ) == 3
28-
29- def test_closed (self ):
30- assert get_status_order ("Closed" ) == 4
20+ def test_blocked (self ):
21+ assert get_status_order ("Blocked" ) == 1
3122
3223 def test_wontfix (self ):
33- assert get_status_order ("Wontfix" ) == 5
24+ assert get_status_order ("Wontfix" ) == 2
3425
3526 def test_invalid (self ):
36- assert get_status_order ("Invalid" ) == 6
27+ assert get_status_order ("Invalid" ) == 3
3728
3829 def test_duplicate (self ):
39- assert get_status_order ("Duplicate" ) == 7
30+ assert get_status_order ("Duplicate" ) == 4
31+
32+ def test_resolved (self ):
33+ assert get_status_order ("Resolved" ) == 5
4034
4135 def test_case_insensitive (self ):
4236 assert get_status_order ("OPEN" ) == 0
43- assert get_status_order ("resolved " ) == 3
44- assert get_status_order ("ClOsEd " ) == 4
37+ assert get_status_order ("blocked " ) == 1
38+ assert get_status_order ("ReSOlvEd " ) == 5
4539
4640 def test_unknown_status (self ):
4741 assert get_status_order ("Unknown" ) is None
@@ -87,8 +81,8 @@ def test_parse_been(self):
8781 assert result == {"type" : "been" , "status" : "Resolved" }
8882
8983 def test_parse_never (self ):
90- result = _parse_single_condition ("never:Closed " )
91- assert result == {"type" : "never" , "status" : "Closed " }
84+ result = _parse_single_condition ("never:Resolved " )
85+ assert result == {"type" : "never" , "status" : "Resolved " }
9286
9387 def test_invalid_type (self ):
9488 with pytest .raises (PhabfiveException ) as exc :
@@ -120,8 +114,8 @@ def test_parse_not_in(self):
120114 assert result == {"type" : "in" , "status" : "Open" , "negated" : True }
121115
122116 def test_parse_not_from (self ):
123- result = _parse_single_condition ("not:from:Closed " )
124- assert result == {"type" : "from" , "status" : "Closed " , "negated" : True }
117+ result = _parse_single_condition ("not:from:Resolved " )
118+ assert result == {"type" : "from" , "status" : "Resolved " , "negated" : True }
125119
126120 def test_parse_not_from_with_direction (self ):
127121 result = _parse_single_condition ("not:from:Open:raised" )
@@ -170,7 +164,7 @@ def test_and_conditions_plus(self):
170164 assert patterns [0 ].conditions [1 ] == {"type" : "in" , "status" : "Resolved" }
171165
172166 def test_complex_pattern (self ):
173- patterns = parse_status_patterns ("from:Open:raised+in:Resolved,to:Closed " )
167+ patterns = parse_status_patterns ("from:Open:raised+in:Resolved,to:Wontfix " )
174168 assert len (patterns ) == 2
175169 # First pattern: AND conditions
176170 assert len (patterns [0 ].conditions ) == 2
@@ -182,7 +176,7 @@ def test_complex_pattern(self):
182176 assert patterns [0 ].conditions [1 ] == {"type" : "in" , "status" : "Resolved" }
183177 # Second pattern
184178 assert len (patterns [1 ].conditions ) == 1
185- assert patterns [1 ].conditions [0 ] == {"type" : "to" , "status" : "Closed " }
179+ assert patterns [1 ].conditions [0 ] == {"type" : "to" , "status" : "Wontfix " }
186180
187181 def test_empty_pattern (self ):
188182 with pytest .raises (PhabfiveException ) as exc :
@@ -241,10 +235,10 @@ def test_matches_been_status(self):
241235 pattern = StatusPattern ([{"type" : "been" , "status" : "Open" }])
242236
243237 transactions = [
244- {"oldValue" : "Open" , "newValue" : "Resolved " , "dateCreated" : 1234567890 },
245- {"oldValue" : "Resolved " , "newValue" : "Closed " , "dateCreated" : 1234567900 }
238+ {"oldValue" : "Open" , "newValue" : "Blocked " , "dateCreated" : 1234567890 },
239+ {"oldValue" : "Blocked " , "newValue" : "Resolved " , "dateCreated" : 1234567900 }
246240 ]
247- current_status = "Closed "
241+ current_status = "Resolved "
248242
249243 assert pattern .matches (transactions , current_status ) is True
250244
@@ -308,7 +302,7 @@ def test_matches_and_conditions_fail(self):
308302 """Test multiple AND conditions fail if any doesn't match"""
309303 pattern = StatusPattern ([
310304 {"type" : "been" , "status" : "Open" },
311- {"type" : "in" , "status" : "Closed " }
305+ {"type" : "in" , "status" : "Wontfix " }
312306 ])
313307
314308 transactions = [
0 commit comments