Skip to content

Commit

Permalink
test: Fix unstable (too time-critical) test case
Browse files Browse the repository at this point in the history
  • Loading branch information
defnull committed Dec 6, 2024
1 parent 750fcbe commit 1a4618c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test_sendfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def test_ims(self):
res = static_file(basename, root=root)
self.assertEqual(304, res.status_code)
self.assertEqual(int(os.stat(__file__).st_mtime), parse_date(res.headers['Last-Modified']))
self.assertAlmostEqual(int(time.time()), parse_date(res.headers['Date']))
self.assertAlmostEqual(int(time.time()), parse_date(res.headers['Date']), delta=2)
request.environ['HTTP_IF_MODIFIED_SINCE'] = bottle.http_date(100)
self.assertEqual(open(__file__,'rb').read(), static_file(basename, root=root).body.read())

Expand Down

0 comments on commit 1a4618c

Please sign in to comment.