From 756370d5e40ebb8c1d49ffcf1c718a4f2bc6bd24 Mon Sep 17 00:00:00 2001 From: Random User Date: Mon, 6 Apr 2020 18:42:21 +0200 Subject: [PATCH] Fix test_creation_date() By hardcoding the time stamp, we are expecting a specific time zone. --- tests/test_info.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_info.py b/tests/test_info.py index 9ad60c1..5479f40 100644 --- a/tests/test_info.py +++ b/tests/test_info.py @@ -144,7 +144,8 @@ def test_creation_date(capsys, create_torrent, human_readable, clear_ansi, regex with human_readable(False): run(['-i', torrent_file]) cap = capsys.readouterr() - assert cap.out == regex(r'^Created\t957911445$', flags=re.MULTILINE) + exp_timestamp = int(date.timestamp()) + assert cap.out == regex(rf'^Created\t{exp_timestamp}$', flags=re.MULTILINE) def test_created_by(capsys, create_torrent, human_readable, clear_ansi, regex):