Skip to content

Commit

Permalink
Fix test_creation_date()
Browse files Browse the repository at this point in the history
By hardcoding the time stamp, we are expecting a specific time zone.
  • Loading branch information
rndusr committed Apr 6, 2020
1 parent 526e956 commit 756370d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 756370d

Please sign in to comment.