mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 23:08:06 +02:00
Solved last open tests
This commit is contained in:
@@ -6,7 +6,7 @@ import unittest
|
||||
import yaml
|
||||
|
||||
# Adjust this import to match the real path in your project
|
||||
from cli.ensure.vars_main_files import run, ROLES_DIR
|
||||
from cli.fix.vars_main_files import run, ROLES_DIR
|
||||
|
||||
class TestEnsureVarsMain(unittest.TestCase):
|
||||
def setUp(self):
|
||||
@@ -17,11 +17,11 @@ class TestEnsureVarsMain(unittest.TestCase):
|
||||
|
||||
# Monkey-patch the module's ROLES_DIR to point here
|
||||
self._orig_roles_dir = ROLES_DIR
|
||||
setattr(__import__("cli.ensure.vars_main_files", fromlist=["ROLES_DIR"]), "ROLES_DIR", self.roles_dir)
|
||||
setattr(__import__("cli.fix.vars_main_files", fromlist=["ROLES_DIR"]), "ROLES_DIR", self.roles_dir)
|
||||
|
||||
def tearDown(self):
|
||||
# restore and cleanup
|
||||
setattr(__import__("cli.ensure.vars_main_files", fromlist=["ROLES_DIR"]), "ROLES_DIR", self._orig_roles_dir)
|
||||
setattr(__import__("cli.fix.vars_main_files", fromlist=["ROLES_DIR"]), "ROLES_DIR", self._orig_roles_dir)
|
||||
shutil.rmtree(self.tmpdir)
|
||||
|
||||
def _make_role(self, name, vars_content=None):
|
||||
|
Reference in New Issue
Block a user