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.

15 lines
608 B

  1. import pytest
  2. from tibi_hardlinks.filename_creation import create_backup_directory_name
  3. @pytest.mark.usefixtures("canned_data_output")
  4. @pytest.mark.parametrize("filename", ["example-old", "example-new"])
  5. def test_filename_good(filename, canned_data_output):
  6. data = canned_data_output(filename)
  7. filenames = {
  8. "example-old": "XT1095/TA44909SO3/QPython3/1.0.3/2017-11-01_07-38-42",
  9. "example-new": "OnePlus 7 Pro/7ea4c847/Luis.Babyphone/2.0.72/2020-10-30_09-12-41",
  10. }
  11. generated_filename = create_backup_directory_name(data)
  12. assert filenames[filename] == generated_filename