File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -122,8 +122,8 @@ def test_create_with_restart_policy(self):
122122 self .client .wait (id )
123123 with pytest .raises (docker .errors .APIError ) as exc :
124124 self .client .remove_container (id )
125- err = exc .value .explanation
126- assert 'You cannot remove ' in err
125+ err = exc .value .explanation . lower ()
126+ assert 'stop the container before ' in err
127127 self .client .remove_container (id , force = True )
128128
129129 def test_create_container_with_volumes_from (self ):
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ def test_api_error_parses_json(self):
99 self .client .start (container ['Id' ])
1010 with pytest .raises (APIError ) as cm :
1111 self .client .remove_container (container ['Id' ])
12- explanation = cm .value .explanation
13- assert 'You cannot remove a running container' in explanation
12+ explanation = cm .value .explanation . lower ()
13+ assert 'stop the container before ' in explanation
1414 assert '{"message":' not in explanation
1515 self .client .remove_container (container ['Id' ], force = True )
You can’t perform that action at this time.
0 commit comments