fix formatting issues

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Alice Kile authored and James Valleroy committed 2019-12-07 13:08:35 -05:00
1 parent fa74a26042
commit eb83e00011
134 files changed
+598 -720

No files matched your search

@@ -107,8 +107,7 @@ def select_domain_name(browser, app_name, domain_name):
@given('the shadowsocks application is configured')
def configure_shadowsocks(browser):
application.configure_shadowsocks(browser, 'example.com',
'fakepassword')
application.configure_shadowsocks(browser, 'example.com', 'fakepassword')
@when(
@@ -128,8 +127,8 @@ def assert_shadowsocks_configuration(browser, server, password):
password) == application.shadowsocks_get_configuration(browser)
@when(
parsers.parse('I modify the maximum file size of coquelicot to {size:d}'))
@when(parsers.parse('I modify the maximum file size of coquelicot to {size:d}')
)
def modify_max_file_size(browser, size):
application.modify_max_file_size(browser, size)
@@ -372,38 +371,55 @@ def tahoe_given_add_introducer(browser, domain):
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"')
@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"')
@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"')
@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"')
@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"')
@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'
@@ -451,8 +467,8 @@ def app_visible_on_front_page(browser, app_name):
assert len(shortcuts) == 1
@then(
parsers.parse('{app_name:w} app should not be visible on the front page'))
@then(parsers.parse('{app_name:w} app should not be visible on the front page')
)
def app_not_visible_on_front_page(browser, app_name):
shortcuts = application.find_on_front_page(browser, app_name)
assert len(shortcuts) == 0
@@ -19,7 +19,6 @@ from pytest_bdd import given, parsers, then, when
from support import config, interface
default_url = config['DEFAULT']['url']
@@ -52,8 +51,8 @@ def new_user_does_not_exist(browser, name):
@given(parsers.parse('the user {name:w} exists'))
def test_user_exists(browser, name):
interface.nav_to_module(browser, 'users')
user_link = browser.find_link_by_href(
'/plinth/sys/users/' + name + '/edit/')
user_link = browser.find_link_by_href('/plinth/sys/users/' + name +
'/edit/')
if not user_link:
create_user(browser, name, 'secret123')
+5 -3
View File
@@ -61,8 +61,9 @@ def verify_upload_password(browser, password):
'I upload the sample local file to coquelicot with password {password:w}'
))
def coquelicot_upload_file(browser, sample_local_file, password):
url = site.upload_file_to_coquelicot(
browser, sample_local_file['file_path'], password)
url = site.upload_file_to_coquelicot(browser,
sample_local_file['file_path'],
password)
sample_local_file['upload_url'] = url
@@ -214,7 +215,8 @@ def syncthing_folder_not_present(browser, folder_name):
@given(
parsers.parse(
'folder {folder_path:S} is present as syncthing folder {folder_name:w}'))
'folder {folder_path:S} is present as syncthing folder {folder_name:w}'
))
def syncthing_folder_present(browser, folder_name, folder_path):
if not site.syncthing_folder_is_present(browser, folder_name):
site.syncthing_add_folder(browser, folder_name, folder_path)