diff --git a/tests/functional/tests/model.py b/tests/functional/tests/model.py index 7bca3373..5f5d4d69 100644 --- a/tests/functional/tests/model.py +++ b/tests/functional/tests/model.py @@ -58,8 +58,7 @@ def test_scp_from_unit(self): test_file = "test.txt" path = f"/tmp/{test_file}" exp_path = os.path.join(tmp_dir, test_file) - zaza.sync_wrapper(self.model.connect)() - zaza.sync_wrapper(self.model._model.units[TESTED_UNIT].run)(f"echo 'test' > {path}") + zaza.model.run_on_unit(unit_name=TESTED_UNIT, command=f"echo 'test' > {path}") zaza.sync_wrapper(self.model.scp_from_unit)(TESTED_UNIT, path, tmp_dir) self.assertTrue(os.path.exists(exp_path))