Skip to content

Instantly share code, notes, and snippets.

@goujonbe
Last active October 31, 2020 16:21
Show Gist options
  • Save goujonbe/e629e4d3d1384fda3909f0e1be57dd81 to your computer and use it in GitHub Desktop.
Save goujonbe/e629e4d3d1384fda3909f0e1be57dd81 to your computer and use it in GitHub Desktop.
@pytest.mark.freeze_time("2020-01-15 13:00:00")
def test_get_time_since_subscription():
test_subscribtion_date = datetime.datetime(2020, 1, 10, 12)
assert get_time_since_subscription(test_subscribtion_date) == 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment