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.filesystem import read_file, mkdir, write_to_yaml, read_yaml
|
||||||
from moulinette.utils.process import check_output
|
from moulinette.utils.process import check_output
|
||||||
|
|
||||||
|
from yunohost.domain import domain_list_cache
|
||||||
from yunohost.app import (
|
from yunohost.app import (
|
||||||
app_info,
|
app_info,
|
||||||
_is_installed,
|
_is_installed,
|
||||||
|
@ -1284,6 +1285,8 @@ class RestoreManager:
|
||||||
else:
|
else:
|
||||||
operation_logger.success()
|
operation_logger.success()
|
||||||
|
|
||||||
|
domain_list_cache = {}
|
||||||
|
|
||||||
regen_conf()
|
regen_conf()
|
||||||
|
|
||||||
_tools_migrations_run_after_system_restore(
|
_tools_migrations_run_after_system_restore(
|
||||||
|
|
|
@ -2,6 +2,7 @@ import pytest
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
from mock import patch
|
||||||
|
|
||||||
from .conftest import message, raiseYunohostError, get_test_apps_dir
|
from .conftest import message, raiseYunohostError, get_test_apps_dir
|
||||||
|
|
||||||
|
@ -77,7 +78,8 @@ def setup_function(function):
|
||||||
if "with_permission_app_installed" in markers:
|
if "with_permission_app_installed" in markers:
|
||||||
assert not app_is_installed("permissions_app")
|
assert not app_is_installed("permissions_app")
|
||||||
user_create("alice", "Alice", "White", maindomain, "test123Ynh")
|
user_create("alice", "Alice", "White", maindomain, "test123Ynh")
|
||||||
install_app("permissions_app_ynh", "/urlpermissionapp" "&admin=alice")
|
with patch.object(os, "isatty", return_value=False):
|
||||||
|
install_app("permissions_app_ynh", "/urlpermissionapp" "&admin=alice")
|
||||||
assert app_is_installed("permissions_app")
|
assert app_is_installed("permissions_app")
|
||||||
|
|
||||||
if "with_custom_domain" in markers:
|
if "with_custom_domain" in markers:
|
||||||
|
|
|
@ -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("non-existing-domain.yunohost.org") == "yunohost.org"
|
||||||
assert _get_dns_zone_for_domain("yolo.nohost.me") == "nohost.me"
|
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("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"
|
assert _get_dns_zone_for_domain("foo.yolo.test") == "test"
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue