Skip to content

Commit 0566f12

Browse files
committed
Fix missing asserts or assignments
Signed-off-by: Aarni Koskela <akx@iki.fi>
1 parent cc76c9c commit 0566f12

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tests/integration/api_swarm_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,11 @@ def test_leave_swarm(self):
127127
assert self.init_swarm()
128128
with pytest.raises(docker.errors.APIError) as exc_info:
129129
self.client.leave_swarm()
130-
exc_info.value.response.status_code == 500
130+
assert exc_info.value.response.status_code == 500
131131
assert self.client.leave_swarm(force=True)
132132
with pytest.raises(docker.errors.APIError) as exc_info:
133133
self.client.inspect_swarm()
134-
exc_info.value.response.status_code == 406
134+
assert exc_info.value.response.status_code == 406
135135
assert self.client.leave_swarm(force=True)
136136

137137
@requires_api_version('1.24')

tests/integration/models_containers_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def test_list_sparse(self):
221221
assert container.status == 'running'
222222
assert container.image == client.images.get('alpine')
223223
with pytest.raises(docker.errors.DockerException):
224-
container.labels
224+
_ = container.labels
225225

226226
container.kill()
227227
container.remove()

tests/unit/api_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ def test_read_from_socket_no_stream_tty_demux(self):
581581

582582
def test_read_from_socket_no_stream_no_tty(self):
583583
res = self.request(stream=False, tty=False, demux=False)
584-
res == self.stdout_data + self.stderr_data
584+
assert res == self.stdout_data + self.stderr_data
585585

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

0 commit comments

Comments
 (0)