File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -122,8 +122,8 @@ def test_create_with_restart_policy(self):
122
122
self .client .wait (id )
123
123
with pytest .raises (docker .errors .APIError ) as exc :
124
124
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
127
127
self .client .remove_container (id , force = True )
128
128
129
129
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):
9
9
self .client .start (container ['Id' ])
10
10
with pytest .raises (APIError ) as cm :
11
11
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
14
14
assert '{"message":' not in explanation
15
15
self .client .remove_container (container ['Id' ], force = True )
You can’t perform that action at this time.
0 commit comments