mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
dyndns: fix tests
This commit is contained in:
parent
82affd2984
commit
53ffe3c1c0
2 changed files with 7 additions and 11 deletions
|
@ -715,7 +715,9 @@ class DomainConfigPanel(ConfigPanel):
|
||||||
self.entity, self.new_values["recovery_password"]
|
self.entity, self.new_values["recovery_password"]
|
||||||
)
|
)
|
||||||
# Do not save password in yaml settings
|
# Do not save password in yaml settings
|
||||||
|
if "recovery_password" in self.values:
|
||||||
del self.values["recovery_password"]
|
del self.values["recovery_password"]
|
||||||
|
if "recovery_password" in self.new_values:
|
||||||
del self.new_values["recovery_password"]
|
del self.new_values["recovery_password"]
|
||||||
assert "recovery_password" not in self.future_values
|
assert "recovery_password" not in self.future_values
|
||||||
|
|
||||||
|
|
|
@ -75,12 +75,13 @@ def test_domain_add():
|
||||||
assert TEST_DOMAINS[2] in domain_list()["domains"]
|
assert TEST_DOMAINS[2] in domain_list()["domains"]
|
||||||
|
|
||||||
|
|
||||||
def test_domain_add_subscribe():
|
def test_domain_add_and_remove_dyndns():
|
||||||
time.sleep(35) # Dynette blocks requests that happen too frequently
|
time.sleep(35) # Dynette blocks requests that happen too frequently
|
||||||
assert TEST_DYNDNS_DOMAIN not in domain_list()["domains"]
|
assert TEST_DYNDNS_DOMAIN not in domain_list()["domains"]
|
||||||
domain_add(TEST_DYNDNS_DOMAIN, dyndns_recovery_password=TEST_DYNDNS_PASSWORD)
|
domain_add(TEST_DYNDNS_DOMAIN, dyndns_recovery_password=TEST_DYNDNS_PASSWORD)
|
||||||
assert TEST_DYNDNS_DOMAIN in domain_list()["domains"]
|
assert TEST_DYNDNS_DOMAIN in domain_list()["domains"]
|
||||||
|
domain_remove(TEST_DYNDNS_DOMAIN, dyndns_recovery_password=TEST_DYNDNS_PASSWORD)
|
||||||
|
assert TEST_DYNDNS_DOMAIN not in domain_list()["domains"]
|
||||||
|
|
||||||
def test_domain_add_existing_domain():
|
def test_domain_add_existing_domain():
|
||||||
with pytest.raises(MoulinetteError):
|
with pytest.raises(MoulinetteError):
|
||||||
|
@ -94,13 +95,6 @@ def test_domain_remove():
|
||||||
assert TEST_DOMAINS[1] not in domain_list()["domains"]
|
assert TEST_DOMAINS[1] not in domain_list()["domains"]
|
||||||
|
|
||||||
|
|
||||||
def test_domain_remove_unsubscribe():
|
|
||||||
time.sleep(35) # Dynette blocks requests that happen too frequently
|
|
||||||
assert TEST_DYNDNS_DOMAIN in domain_list()["domains"]
|
|
||||||
domain_remove(TEST_DYNDNS_DOMAIN, dyndns_recovery_password=TEST_DYNDNS_PASSWORD)
|
|
||||||
assert TEST_DYNDNS_DOMAIN not in domain_list()["domains"]
|
|
||||||
|
|
||||||
|
|
||||||
def test_main_domain():
|
def test_main_domain():
|
||||||
current_main_domain = _get_maindomain()
|
current_main_domain = _get_maindomain()
|
||||||
assert domain_main_domain()["current_main_domain"] == current_main_domain
|
assert domain_main_domain()["current_main_domain"] == current_main_domain
|
||||||
|
|
Loading…
Add table
Reference in a new issue