def test_can_start_and_stop_mountebank(mountebank_install): server = windows.WindowsServer(DEFAULT_TEST_PATH) with server: pid = server.process.pid assert server.process is not None assert server.process.poll() is None assert server.process is None assert is_process_active(pid) is False
def test_can_load_new_config(mountebank_install, mark_for_removal, sample_config): root = get_root_mountebank_path(DEFAULT_TEST_PATH) config_file_path = os.path.join(root, "example.json") mark_for_removal(config_file_path) with open(config_file_path, 'w') as config_file: config_file.write(sample_config) server = windows.WindowsServer(DEFAULT_TEST_PATH) with server: server.load_config_file("example.json") assert server.process.poll() is None
def test_can_save_config(mountebank_install): server = windows.WindowsServer(DEFAULT_TEST_PATH) with server: server.save_config_file("TEST.json") assert server._find_config(server.mountebank_path, "TEST.json")
def test_can_find_bin_file(mountebank_install): server = windows.WindowsServer(DEFAULT_TEST_PATH) with server: assert "mountebank/bin/mb" in server._find_bin_file( server.mountebank_path)