From c47fa0f9a23689f0fce6e02364f12288bbf7c7db Mon Sep 17 00:00:00 2001 From: Hossein Shafagh Date: Thu, 24 Jan 2019 17:52:22 -0800 Subject: [PATCH] adjusting the tests to reflect on the new full year convert limit! --- lemur/tests/test_missing.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lemur/tests/test_missing.py b/lemur/tests/test_missing.py index 4f2c20c6..80a7df48 100644 --- a/lemur/tests/test_missing.py +++ b/lemur/tests/test_missing.py @@ -6,12 +6,12 @@ from freezegun import freeze_time def test_convert_validity_years(session): from lemur.common.missing import convert_validity_years - with freeze_time("2016-01-01"): + with freeze_time("2016-01-02"): data = convert_validity_years(dict(validity_years=2)) assert data['validity_start'] == arrow.utcnow().isoformat() - assert data['validity_end'] == arrow.utcnow().replace(years=+2).isoformat() + assert data['validity_end'] == arrow.utcnow().replace(years=+2, days=-1).isoformat() - with freeze_time("2015-01-10"): + with freeze_time("2015-01-11"): data = convert_validity_years(dict(validity_years=1)) - assert data['validity_end'] == arrow.utcnow().replace(years=+1, days=-2).isoformat() + assert data['validity_end'] == arrow.utcnow().replace(years=+1, days=-3).isoformat()