def test_download_successful_invalid_checksum_type(self, mock_copy, mock_verify_size, mock_verify_checksum, mock_open): self.config.get.return_value = True mock_verify_checksum.side_effect = verification.InvalidChecksumType() content_listener = listener.PackageListener(self, self.metadata_files) self.assertRaises(verification.InvalidChecksumType, content_listener.download_succeeded, self.report) mock_verify_checksum.assert_called_once() self.assertFalse(self.progress_report['content'].success.called)
def test_download_successful_invalid_checksum_type(self, mock_move, mock_verify_size, mock_verify_checksum, mock_open): self.sync_call_config.get.return_value = True mock_verify_checksum.side_effect = verification.InvalidChecksumType() content_listener = listener.ContentListener(self.sync_conduit, self.progress_report, self.sync_call_config, self.metadata_files) content_listener.download_succeeded(self.report) mock_verify_checksum.assert_called_once() self.assertFalse(self.progress_report['content'].success.called)