aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_push.py')
-rw-r--r--tests/test_push.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/test_push.py b/tests/test_push.py
index 0479191..daa99c7 100644
--- a/tests/test_push.py
+++ b/tests/test_push.py
@@ -26,11 +26,18 @@ def test_decrypt(api):
26@pytest.mark.vcr(match_on=['path']) 26@pytest.mark.vcr(match_on=['path'])
27def test_push_set(api): 27def test_push_set(api):
28 priv, pub = api.push_subscription_generate_keys() 28 priv, pub = api.push_subscription_generate_keys()
29 sub = api.push_subscription_set("example.com", pub) 29 sub = api.push_subscription_set("example.com", pub, follow_events=True, favourite_events=True, reblog_events=True, mention_events=True, poll_events=True, follow_request_events=True, status_events=True, policy='none')
30
31 assert sub == api.push_subscription() 30 assert sub == api.push_subscription()
32 assert sub.endpoint == "https://example.com" 31 assert sub.endpoint == "https://example.com"
33 32
33 should_throw = False
34 try:
35 sub = api.push_subscription_set("example.com", pub, follow_events=True, favourite_events=True, reblog_events=True, mention_events=True, poll_events=True, follow_request_events=True, status_events=True, policy='not a valid value')
36 should_throw = True
37 except:
38 pass
39 assert not should_throw
40
34@pytest.mark.vcr(match_on=['path']) 41@pytest.mark.vcr(match_on=['path'])
35def test_push_update(api): 42def test_push_update(api):
36 priv, pub = api.push_subscription_generate_keys() 43 priv, pub = api.push_subscription_generate_keys()
Powered by cgit v1.2.3 (git 2.41.0)