mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
radicale: Add functional tests for setting access rights
Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
1 parent
24f1967b6a
commit
af018e3018
3 files changed
+71
No files matched your search
@@ -361,3 +361,39 @@ def tahoe_given_add_introducer(browser, domain):
|
||||
@when(parsers.parse('I remove {domain:S} as a tahoe introducer'))
|
||||
def tahoe_remove_introducer(browser, domain):
|
||||
application.tahoe_remove_introducer(browser, domain)
|
||||
|
||||
@given('the access rights are set to "only the owner can view or make changes"')
|
||||
def radicale_given_owner_only(browser):
|
||||
application.radicale_set_access_rights(browser, 'owner_only')
|
||||
|
||||
@given('the access rights are set to "any user can view, but only the owner can make changes"')
|
||||
def radicale_given_owner_write(browser):
|
||||
application.radicale_set_access_rights(browser, 'owner_write')
|
||||
|
||||
@given('the access rights are set to "any user can view or make changes"')
|
||||
def radicale_given_authenticated(browser):
|
||||
application.radicale_set_access_rights(browser, 'authenticated')
|
||||
|
||||
@when('I change the access rights to "only the owner can view or make changes"')
|
||||
def radicale_set_owner_only(browser):
|
||||
application.radicale_set_access_rights(browser, 'owner_only')
|
||||
|
||||
@when('I change the access rights to "any user can view, but only the owner can make changes"')
|
||||
def radicale_set_owner_write(browser):
|
||||
application.radicale_set_access_rights(browser, 'owner_write')
|
||||
|
||||
@when('I change the access rights to "any user can view or make changes"')
|
||||
def radicale_set_authenticated(browser):
|
||||
application.radicale_set_access_rights(browser, 'authenticated')
|
||||
|
||||
@then('the access rights should be "only the owner can view or make changes"')
|
||||
def radicale_check_owner_only(browser):
|
||||
assert application.radicale_get_access_rights(browser) == 'owner_only'
|
||||
|
||||
@then('the access rights should be "any user can view, but only the owner can make changes"')
|
||||
def radicale_check_owner_write(browser):
|
||||
assert application.radicale_get_access_rights(browser) == 'owner_write'
|
||||
|
||||
@then('the access rights should be "any user can view or make changes"')
|
||||
def radicale_check_authenticated(browser):
|
||||
assert application.radicale_get_access_rights(browser) == 'authenticated'
|
||||
Reference in new issue
Block a user