Skip to content

Commit

Permalink
fix: updated tests based on changes of dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
leferrad committed Mar 23, 2023
1 parent 6fab3d5 commit 469fc96
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,9 @@ def test_decode_image_zero_candidates(self, mock_bits, mock_imread, mock_float_t

steganogan.decoder.return_value.view.return_value.__gt__.return_value = _image

bits_image = _image.data.cpu.return_value.numpy.return_value.tolist.return_value
bits_image = (
_image.data.int.return_value.cpu.return_value.numpy.return_value.tolist.return_value
)

mock_bytearray_to_text.return_value = None
mock_os.return_value = True
Expand Down Expand Up @@ -1029,7 +1031,9 @@ def test_decode_image(self, mock_bits, mock_imread, mock_float_tensor,

steganogan.decoder.return_value.view.return_value.__gt__.return_value = _image

bits_image = _image.data.cpu.return_value.numpy.return_value.tolist.return_value
bits_image = (
_image.data.int.return_value.cpu.return_value.numpy.return_value.tolist.return_value
)
mock_bits.return_value.split.return_value = [candidate]

mock_bytearray_to_text.return_value = _candidate
Expand Down

0 comments on commit 469fc96

Please sign in to comment.