Fix flaky tests involving feed export batches (#5898)

Co-authored-by: jmannoop <jmannoop@umich.edu>
This commit is contained in:
tstauder 2023-04-19 02:33:32 -04:00 committed by GitHub
parent 02f3e8d413
commit ef61fb5698
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -2542,7 +2542,7 @@ class BatchDeliveriesTest(FeedExportTestBase):
def test_batch_path_differ(self):
"""
Test that the name of all batch files differ from each other.
So %(batch_time)s replaced with the current date.
So %(batch_id)d replaced with the current id.
"""
items = [
self.MyItem({"foo": "bar1", "egg": "spam1"}),
@ -2552,7 +2552,7 @@ class BatchDeliveriesTest(FeedExportTestBase):
settings = {
"FEEDS": {
self._random_temp_filename()
/ "%(batch_time)s": {
/ "%(batch_id)d": {
"format": "json",
},
},
@ -2615,7 +2615,7 @@ class BatchDeliveriesTest(FeedExportTestBase):
return super().open(*args, **kwargs)
key = "export.csv"
uri = f"s3://{bucket}/{key}/%(batch_time)s.json"
uri = f"s3://{bucket}/{key}/%(batch_id)d.json"
batch_item_count = 1
settings = {
"AWS_ACCESS_KEY_ID": "access_key",