(upload, expected_output_set)
| 275 | ) |
| 276 | |
| 277 | def validate_upload(upload, expected_output_set): |
| 278 | assert len(upload["Contents"]) > 0 |
| 279 | output_lines = set() |
| 280 | for obj in upload["Contents"]: |
| 281 | assert obj["Key"].endswith(".csv") |
| 282 | key = obj["Key"] |
| 283 | object_response = s3_client.get_object(Bucket=bucket_name, Key=key) |
| 284 | body = object_response["Body"].read().decode("utf-8") |
| 285 | output_lines.update(body.splitlines()) |
| 286 | assert output_lines == expected_output_set |
| 287 | |
| 288 | # asserting the uploaded files |
| 289 | date = c.sql_query("SELECT TO_CHAR(now(), 'YYYY-MM-DD')")[0][0] |
no test coverage detected