tahoe: Add functional tests

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Joseph Nuthalapati authored and James Valleroy committed 2018-11-01 20:39:52 -04:00
1 parent 09a3d57bfd
commit 78950b1ba3
3 files changed
+117

No files matched your search

@@ -328,3 +328,35 @@ def tor_download_software_over_tor_enable(browser, enable):
parsers.parse('download software packages over tor should be {enabled:w}'))
def tor_assert_download_software_over_tor(browser, enabled):
application.tor_assert_feature_enabled(browser, 'software', enabled)
@then(parsers.parse('{domain:S} should be a tahoe {introducer_type:w} introducer'))
def tahoe_assert_introducer(browser, domain, introducer_type):
assert application.tahoe_get_introducer(browser, domain, introducer_type)
@then(parsers.parse('{domain:S} should not be a tahoe {introducer_type:w} introducer'))
def tahoe_assert_not_introducer(browser, domain, introducer_type):
assert not application.tahoe_get_introducer(browser, domain, introducer_type)
@given(parsers.parse('{domain:S} is not a tahoe introducer'))
def tahoe_given_remove_introducer(browser, domain):
if application.tahoe_get_introducer(browser, domain, 'connected'):
application.tahoe_remove_introducer(browser, domain)
@when(parsers.parse('I add {domain:S} as a tahoe introducer'))
def tahoe_add_introducer(browser, domain):
application.tahoe_add_introducer(browser, domain)
@given(parsers.parse('{domain:S} is a tahoe introducer'))
def tahoe_given_add_introducer(browser, domain):
if not application.tahoe_get_introducer(browser, domain, 'connected'):
application.tahoe_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)