Test the encrypt_string method with mocked values.
(self, mock_encrypt_string)
| 79 | |
| 80 | @mock.patch("XOR_cipher.XORCipher.encrypt_string") |
| 81 | def test_encrypt_string(self, mock_encrypt_string): |
| 82 | """ |
| 83 | Test the encrypt_string method with mocked values. |
| 84 | """ |
| 85 | |
| 86 | ans = mock.MagicMock() |
| 87 | content = mock.MagicMock() |
| 88 | key = mock.MagicMock() |
| 89 | XORCipher.encrypt_string = mock.MagicMock(return_value=ans) |
| 90 | XORCipher.encrypt_string(content, key) |
| 91 | |
| 92 | XORCipher.encrypt_string.assert_called_with(content, key) |
| 93 | |
| 94 | @mock.patch("XOR_cipher.XORCipher.decrypt_string") |
| 95 | def test_decrypt_string(self, mock_decrypt_string): |
nothing calls this directly
no test coverage detected