Skip to content

Commit

Permalink
test_collect_logs: mock shutil.copy()
Browse files Browse the repository at this point in the history
  • Loading branch information
panlinux committed Jan 1, 2024
1 parent c387cdd commit 846a068
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions uaclient/cli/tests/test_cli_collect_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def test_collect_logs_help(
@mock.patch("pathlib.Path.stat")
@mock.patch("os.chown")
@mock.patch("os.path.isfile", return_value=True)
@mock.patch("shutil.copy")
@mock.patch("uaclient.system.write_file")
@mock.patch("uaclient.system.load_file")
@mock.patch("uaclient.system.subp", return_value=(None, None))
Expand All @@ -75,6 +76,7 @@ def test_collect_logs(
m_subp,
_load_file,
_write_file,
m_shutilcopy,
m_isfile,
_chown,
_stat,
Expand Down Expand Up @@ -190,6 +192,7 @@ def test_collect_logs(
assert redact.call_count == is_file_calls + len(user_log_files) - len(
APPARMOR_PROFILES
)
assert m_shutilcopy.call_count == len(APPARMOR_PROFILES)


class TestParser:
Expand Down

0 comments on commit 846a068

Please sign in to comment.