From 4530df47fff88f57ff2481f87e7fa794151f5783 Mon Sep 17 00:00:00 2001 From: Raphael Roberts Date: Wed, 17 Mar 2021 01:20:34 -0500 Subject: [PATCH] Made test find_backup_data. Unit tests make life so much easier --- tests/test_backup_class.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/test_backup_class.py diff --git a/tests/test_backup_class.py b/tests/test_backup_class.py new file mode 100644 index 0000000..22af37d --- /dev/null +++ b/tests/test_backup_class.py @@ -0,0 +1,12 @@ +import pytest +from pathlib import Path + +from tibi_hardlinks.backup_parser import read_backup_properties +from tibi_hardlinks.backups import find_backup_data, Backup + + +@pytest.mark.parametrize( + "property_filepath", Path("../test_data/mock_backup_data").glob("*.properties") +) +def test_find_backup_data_on_files(property_filepath): + find_backup_data(property_filepath, read_backup_properties(property_filepath))