thorn.funtests.base

Base-class for functional test suites.

Extends Cyanide stress test suite with utilities used to test Thorn.

class thorn.funtests.base.WebhookSuite(app, no_color=False, **kwargs)[source]

Thorn integration test suite.

assert_article_event_received(article, event, sub=None, reverse=None, ref=None, n=1)[source]
assert_log(ref=None, maxlen=1)[source]
assert_log_matches(log, **expected)[source]
assert_ok_pidbox_response(replies)[source]
assert_webhook_not_received(ref=None)[source]
create_article(title, state=u'PENDING', author=None)[source]
delete(*path, **data)[source]
get(*path, **data)[source]
headers()[source]
hook_clear(event)[source]
hook_subscribe(event, url, callback=None)[source]
hook_unsubscribe(event, url)[source]
list_subscriptions()[source]
override_worker_setting(*args, **kwds)[source]
post(*path, **data)[source]
reverse_article(article)[source]
setenv(setting_name, new_value)[source]
setup()[source]
subscribe(event, ref=None, rest=None)[source]
token = None
token_type = u'Token'
unsubscribe(url)[source]
user = None
user2 = None
wait_for_webhook_received(ref=None, maxlen=1)[source]
worker_subscribe_to(*args, **kwds)[source]
thorn.funtests.base.new_ref()[source]

Create new reference ID.

thorn.funtests.base.url(*s)[source]

Create URL by components in *s.

thorn.funtests.base.event_url(event, ref=None, rest=None)[source]

Return url for event.

thorn.funtests.base.testcase(*groups, **kwargs)[source]