def test_appchangeurl(): install_changeurl_app("/changeurl") check_changeurl_app("/changeurl") app_change_url("change_url_app", maindomain, "/newchangeurl") # For some reason the nginx reload can take some time to propagate ...? time.sleep(2) check_changeurl_app("/newchangeurl")
def test_permission_app_change_url(): app_install(os.path.join(get_test_apps_dir(), "permissions_app_ynh"), args="domain=%s&domain_2=%s&path=%s&admin=%s" % (maindomain, other_domains[0], "/urlpermissionapp", "alice"), force=True) # FIXME : should rework this test to look for differences in the generated app map / app tiles ... res = user_permission_list(full=True)['permissions'] assert res['permissions_app.main']['url'] == "/" assert res['permissions_app.admin']['url'] == "/admin" assert res['permissions_app.dev']['url'] == "/dev" app_change_url("permissions_app", maindomain, "/newchangeurl") res = user_permission_list(full=True)['permissions'] assert res['permissions_app.main']['url'] == "/" assert res['permissions_app.admin']['url'] == "/admin" assert res['permissions_app.dev']['url'] == "/dev"
def test_appchangeurl_sameurl(): install_changeurl_app("/changeurl") check_changeurl_app("/changeurl") with pytest.raises(YunohostError): app_change_url("change_url_app", maindomain, "changeurl")