Test the encrypt_file method with mocked values.
(self, mock_encrypt_file)
| 107 | |
| 108 | @mock.patch("XOR_cipher.XORCipher.encrypt_file") |
| 109 | def test_encrypt_file(self, mock_encrypt_file): |
| 110 | """ |
| 111 | Test the encrypt_file method with mocked values. |
| 112 | """ |
| 113 | |
| 114 | file = mock.MagicMock() |
| 115 | key = mock.MagicMock() |
| 116 | XORCipher.encrypt_file = mock.MagicMock(return_value=True) |
| 117 | XORCipher.encrypt_file(file, key) |
| 118 | |
| 119 | XORCipher.encrypt_file.assert_called_with(file, key) |
| 120 | |
| 121 | @mock.patch("XOR_cipher.XORCipher.decrypt_file") |
| 122 | def test_decrypt_file(self, mock_decrypt_file): |
nothing calls this directly
no test coverage detected