test_file_modified.py 455 B

12345678910111213141516
  1. import json
  2. import pathlib
  3. test_assets_path = pathlib.Path('../__takeout_helper_test_data__')
  4. out_path = test_assets_path / 'output'
  5. asserts_path = test_assets_path / 'asserts'
  6. def test_file_modified():
  7. with open(asserts_path / 'file_modified.json', 'r') as f:
  8. _data = json.load(f)
  9. pairs = {**_data['photos'], **_data['videos']}
  10. for key in pairs:
  11. file = out_path / key
  12. assert file.stat().st_mtime == pairs[key]