alan-turing-institute / DTBase

A starting point from which digital twins can be developed.
MIT License
11 stars 4 forks source link

Fix ingress tests #180

Closed mhauru closed 8 months ago

mhauru commented 8 months ago

One of the ingress tests started failing once the hardcoded datetime in it fell 5 days behind the current date, because of the limitations of the API. I fixed it by using the freezegun library to mock all calls to datetime.now(). Introducing this ability made the override_inferred_weather_api argument unnecessary, so I removed it.

codecov-commenter commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (2dde169) 89.16% compared to head (f5ae881) 89.17%.

:exclamation: Current head f5ae881 differs from pull request most recent head a38d36e. Consider uploading reports for the commit a38d36e to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #180 +/- ## ========================================== + Coverage 89.16% 89.17% +0.01% ========================================== Files 75 75 Lines 5039 5036 -3 ========================================== - Hits 4493 4491 -2 + Misses 546 545 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

EdwinB12 commented 8 months ago

:O FreezeTime!! Should have known there would be a python library for my problems!