From 2abb1f171579d7c7b4eadbe3bfde72499174427f Mon Sep 17 00:00:00 2001 From: codl Date: Thu, 30 Nov 2017 02:05:09 +0100 Subject: disable follow request emails on test user --- tests/setup.sql | 19 +++++++++++++++++++ tests/test_follow_requests.py | 3 --- 2 files changed, 19 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/setup.sql b/tests/setup.sql index d65e503..0ff6da0 100644 --- a/tests/setup.sql +++ b/tests/setup.sql @@ -1,3 +1,4 @@ +DELETE FROM settings WHERE id = 1234567890123456; DELETE FROM oauth_access_tokens WHERE id = 6543210987654321; DELETE FROM oauth_access_tokens WHERE id = 1234567890123456; DELETE FROM oauth_applications WHERE id = 1234567890123456; @@ -84,3 +85,21 @@ INSERT INTO oauth_access_tokens ( 1, now() ); + +INSERT INTO settings ( + id, + var, + value, + thing_type, + thing_id, + created_at, + updated_at +) VALUES ( + 1234567890123456, + 'notification_emails', + E'---\nfollow_request: false', + 'User', + 1234567890123456, + now(), + now() +) diff --git a/tests/test_follow_requests.py b/tests/test_follow_requests.py index 67626f7..ccf7939 100644 --- a/tests/test_follow_requests.py +++ b/tests/test_follow_requests.py @@ -6,9 +6,6 @@ def test_follow_requests(api): assert isinstance(reqs, list) -# warning: these two send emails, which open in letter opener by default -# so if you are re-recording a cassette for either of these mastodon will -# probably open a browser window for you, which you can safely close @pytest.mark.vcr() def test_follow_request_authorize(api, api2): api2.account_follow(1234567890123456) -- cgit v1.2.3