You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
634 B

  1. import pytest
  2. from pathlib import Path
  3. from tibi_hardlinks.cache import Cache
  4. from tibi_hardlinks.backup_parser import read_backup_properties
  5. import tibi_hardlinks.backup_parser
  6. from tibi_hardlinks.backups import find_backup_data, Backup
  7. def test_find_backup_data_on_files(property_filepath, monkeypatch, tmp_path):
  8. monkeypatch.setattr(tibi_hardlinks.backup_parser, "tibi_cache", Cache(tmp_path))
  9. assert len(tibi_hardlinks.backup_parser.tibi_cache._store) == 0
  10. find_backup_data(property_filepath, read_backup_properties(property_filepath))
  11. def test_backup_class_init(property_filepath):
  12. Backup(property_filepath)