Skip to content

Commit

Permalink
Fix report test flakiness
Browse files Browse the repository at this point in the history
  • Loading branch information
simensma-fresh committed Nov 27, 2024
1 parent dfb16fc commit 8c34a68
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions services/core-api/tests/reports/resource/test_reports_resource.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
import json
import uuid
from datetime import datetime, timedelta, date
from datetime import datetime, timedelta

from flask import current_app
from tests.factories import MineFactory

from app.api.mines.mine.models.mine import Mine
from app.api.mines.reports.models.mine_report_definition import MineReportDefinition
from app.api.constants import MINE_REPORT_TYPE

from tests.factories import MineFactory, MineReportFactory
THREE_REPORTS = 3
ONE_REPORT = 1
GUID = str(uuid.uuid4)
Expand Down Expand Up @@ -69,7 +64,5 @@ def test_get_reports(test_client, db_session, auth_headers):
for report in get_data['records']:
received_date = datetime.strptime(report['received_date'], '%Y-%m-%d')

assert (start_date <= received_date.date())
assert (received_date.date() <= end_date)


assert (start_date.date() <= received_date.date())
assert (received_date.date() <= end_date.date())

0 comments on commit 8c34a68

Please sign in to comment.