Skip to content

Commit

Permalink
Fix tests after log filename format change.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeZiminski committed Oct 3, 2023
1 parent fb2d5f7 commit e16c5f3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/tests_integration/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def test_logs_make_config_file(self, clean_project_name, tmp_path):

log = self.read_log_file(project.cfg.logging_path)

assert "Starting logging for command make_config_file" in log
assert "Starting logging for command make-config-file" in log
assert "\nVariablesState:\nlocals: {'local_path':" in log
assert "Successfully created rclone config." in log
assert (
Expand All @@ -105,7 +105,7 @@ def test_logs_update_config(self, setup_project):

log = self.read_log_file(setup_project.cfg.logging_path)

assert "Starting logging for command update_config" in log
assert "Starting logging for command update-config" in log
assert (
"\n\nVariablesState:\nlocals: {'option_key': 'central_host_id'"
in log
Expand All @@ -126,7 +126,7 @@ def test_logs_supply_config(self, setup_project, tmp_path):

log = self.read_log_file(orig_project_path)

assert "supply_config_file" in log
assert "supply-config-file" in log
assert "\n\nVariablesState:\nlocals: {'input_path_to_config':" in log
assert "Update successful. New config file: " in log
assert (
Expand Down Expand Up @@ -241,7 +241,7 @@ def test_logs_upload_and_download(

log = self.read_log_file(setup_project.cfg.logging_path)

suffix = "_all" if use_all_alias else ""
suffix = "-all" if use_all_alias else ""

assert (
f"Starting logging for command {upload_or_download}{suffix}" in log
Expand Down Expand Up @@ -299,7 +299,7 @@ def test_logs_upload_and_download_folder_or_file(
log = self.read_log_file(setup_project.cfg.logging_path)

assert (
f"Starting logging for command {upload_or_download}_specific_folder_or_file"
f"Starting logging for command {upload_or_download}-specific-folder-or-file"
in log
)
assert (
Expand Down Expand Up @@ -363,7 +363,7 @@ def test_temp_log_folder_made_make_config_file(
tmp_path_logs = glob.glob(str(project._temp_log_path / "*.log"))

assert len(tmp_path_logs) == 1
assert "make_config_file" in tmp_path_logs[0]
assert "make-config-file" in tmp_path_logs[0]

def test_temp_log_folder_moved_make_config_file(
self, clean_project_name, tmp_path
Expand All @@ -382,7 +382,7 @@ def test_temp_log_folder_moved_make_config_file(

assert len(tmp_path_logs) == 0
assert len(project_path_logs) == 1
assert "make_config_file" in project_path_logs[0]
assert "make-config-file" in project_path_logs[0]

@pytest.mark.skipif("not IS_WINDOWS")
@pytest.mark.parametrize("supply_or_update", ["update", "supply"])
Expand Down

0 comments on commit e16c5f3

Please sign in to comment.