Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix mock of time #15011

Merged
merged 4 commits into from
Oct 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import pytest
from pytest import raises

from freezegun import freeze_time
from dateparser import parse
from pytz import utc

Expand Down Expand Up @@ -93,7 +94,8 @@ def test_calculate_fetch_start_time(last_fetch, first_fetch, output):
assert calculate_fetch_start_time(last_fetch, first_fetch) == output


def test_calculate_fetch_start_time_dynamic():
@freeze_time("2021-01-15")
def test_calculate_fetch_start_time_dynamic(mocker):
"""Unit test
Given
- no last_fetch time no first_fetch
Expand Down
3 changes: 2 additions & 1 deletion Packs/GuardiCore/Integrations/GuardiCoreV2/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ verify_ssl = true

[dev-packages]
pylint = "*"
pytest = "==5.0.1"
pytest = "*"
pytest-mock = "*"
requests-mock = "*"
pytest-asyncio = "*"
freezegun = "*"

[packages]
pytest = "*"
Expand Down
Loading