def test_get_manifest_file_not_found(self, mock_download_file): """Test _get_manifest method when file is not found.""" mock_datetime = DateAccessor().today() mock_download_file.side_effect = AWSReportDownloaderNoFileError("fake error") manifest_file, manifest_json, manifest_modified_timestamp = self.aws_report_downloader._get_manifest( mock_datetime ) self.assertEqual(manifest_file, "") self.assertEqual(manifest_json, self.aws_report_downloader.empty_manifest) self.assertIsNone(manifest_modified_timestamp)
def mock_download_file_error(manifest): """Mock side effect for raising an AWSReportDownloaderNoFileError.""" raise AWSReportDownloaderNoFileError()