def test_stop_cmd(self): pattern = re.compile(r"^(?=.*vboxmanage)(?=.*Island).+") im = IslandManager(self.config) a = im.get_command("stop") assert re.match(pattern, a) print(a)
def test_is_vm_running(self): im = IslandManager(self.config) r = im.stop_island() print(r) assert(im.is_running() is False) im.launch_island() assert (im.is_running() is True)
def __init__(self, config): self.config = config self.commander = Commander(self.config) self.file_manager = FileManager(self.config) self.torrent_manager = TorrentManager(self.config) self.app = self.prepare_app() self.setup = IslandSetup(config=self.config, commander=self.commander, file_manager=self.file_manager, torrent_manager=self.torrent_manager) self.island_manager = IslandManager(self.config, self.commander, self.setup) self.main_window = MainWindow(self.config, self.island_manager, self.setup, self.torrent_manager)
def test_is_vm_running(self): im = IslandManager(self.config) r = im.is_running() print(r)
def test_stop(self): im = IslandManager(self.config) respone = im.stop_island() print(respone)
def test_start(self): im = IslandManager(self.config) respone = im.launch_island() print(respone)
def test_im_init(self): pattern = re.compile(r"^(?=.*vboxmanage)(?=.*Island).+") im = IslandManager(self.config) a = im.get_command("launch") assert re.match(pattern, a) print(a)