Test the decrypt_string method with mocked values.
(self, mock_decrypt_string)
| 93 | |
| 94 | @mock.patch("XOR_cipher.XORCipher.decrypt_string") |
| 95 | def test_decrypt_string(self, mock_decrypt_string): |
| 96 | """ |
| 97 | Test the decrypt_string method with mocked values. |
| 98 | """ |
| 99 | |
| 100 | ans = mock.MagicMock() |
| 101 | content = mock.MagicMock() |
| 102 | key = mock.MagicMock() |
| 103 | XORCipher.decrypt_string = mock.MagicMock(return_value=ans) |
| 104 | XORCipher.decrypt_string(content, key) |
| 105 | |
| 106 | XORCipher.decrypt_string.assert_called_with(content, key) |
| 107 | |
| 108 | @mock.patch("XOR_cipher.XORCipher.encrypt_file") |
| 109 | def test_encrypt_file(self, mock_encrypt_file): |
nothing calls this directly
no test coverage detected