Skip to content

Commit

Permalink
Fix missing asserts or assignments
Browse files Browse the repository at this point in the history
Signed-off-by: Aarni Koskela <akx@iki.fi>
  • Loading branch information
akx committed Aug 15, 2023
1 parent cc76c9c commit 0566f12
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/integration/api_swarm_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ def test_leave_swarm(self):
assert self.init_swarm()
with pytest.raises(docker.errors.APIError) as exc_info:
self.client.leave_swarm()
exc_info.value.response.status_code == 500
assert exc_info.value.response.status_code == 500
assert self.client.leave_swarm(force=True)
with pytest.raises(docker.errors.APIError) as exc_info:
self.client.inspect_swarm()
exc_info.value.response.status_code == 406
assert exc_info.value.response.status_code == 406
assert self.client.leave_swarm(force=True)

@requires_api_version('1.24')
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/models_containers_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def test_list_sparse(self):
assert container.status == 'running'
assert container.image == client.images.get('alpine')
with pytest.raises(docker.errors.DockerException):
container.labels
_ = container.labels

container.kill()
container.remove()
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ def test_read_from_socket_no_stream_tty_demux(self):

def test_read_from_socket_no_stream_no_tty(self):
res = self.request(stream=False, tty=False, demux=False)
res == self.stdout_data + self.stderr_data
assert res == self.stdout_data + self.stderr_data

def test_read_from_socket_no_stream_no_tty_demux(self):
res = self.request(stream=False, tty=False, demux=True)
Expand Down

0 comments on commit 0566f12

Please sign in to comment.