mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Fix tests
This commit is contained in:
parent
f9b3265f71
commit
be8c6f2c35
3 changed files with 7 additions and 2 deletions
|
@ -44,6 +44,7 @@ from moulinette.utils.log import getActionLogger
|
|||
from moulinette.utils.filesystem import read_file, mkdir, write_to_yaml, read_yaml
|
||||
from moulinette.utils.process import check_output
|
||||
|
||||
from yunohost.domain import domain_list_cache
|
||||
from yunohost.app import (
|
||||
app_info,
|
||||
_is_installed,
|
||||
|
@ -1284,6 +1285,8 @@ class RestoreManager:
|
|||
else:
|
||||
operation_logger.success()
|
||||
|
||||
domain_list_cache = {}
|
||||
|
||||
regen_conf()
|
||||
|
||||
_tools_migrations_run_after_system_restore(
|
||||
|
|
|
@ -2,6 +2,7 @@ import pytest
|
|||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
from mock import patch
|
||||
|
||||
from .conftest import message, raiseYunohostError, get_test_apps_dir
|
||||
|
||||
|
@ -77,6 +78,7 @@ def setup_function(function):
|
|||
if "with_permission_app_installed" in markers:
|
||||
assert not app_is_installed("permissions_app")
|
||||
user_create("alice", "Alice", "White", maindomain, "test123Ynh")
|
||||
with patch.object(os, "isatty", return_value=False):
|
||||
install_app("permissions_app_ynh", "/urlpermissionapp" "&admin=alice")
|
||||
assert app_is_installed("permissions_app")
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ def test_get_dns_zone_from_domain_existing():
|
|||
assert _get_dns_zone_for_domain("non-existing-domain.yunohost.org") == "yunohost.org"
|
||||
assert _get_dns_zone_for_domain("yolo.nohost.me") == "nohost.me"
|
||||
assert _get_dns_zone_for_domain("foo.yolo.nohost.me") == "nohost.me"
|
||||
assert _get_dns_zone_for_domain("yolo.test") == "test"
|
||||
assert _get_dns_zone_for_domain("yolo.test") == "yolo.test"
|
||||
assert _get_dns_zone_for_domain("foo.yolo.test") == "test"
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue