1
0
mirror of https://github.com/venthur/blag.git synced 2025-11-25 20:52:43 +00:00
Files
blag/tests/test_devserver.py
2021-03-29 13:22:04 +02:00

22 lines
489 B
Python

import time
from blag import devserver
def test_get_last_modified(cleandir):
# take initial time
t1 = devserver.get_last_modified(['content'])
# wait a bit, create a file and measure again
time.sleep(0.1)
with open('content/test', 'w') as fh:
fh.write('boo')
t2 = devserver.get_last_modified(['content'])
# wait a bit and take time again
time.sleep(0.1)
t3 = devserver.get_last_modified(['content'])
assert t2 > t1
assert t2 == t3