diff options
author | codl <[email protected]> | 2017-11-30 02:05:09 +0100 |
---|---|---|
committer | codl <[email protected]> | 2017-11-30 02:05:09 +0100 |
commit | 2abb1f171579d7c7b4eadbe3bfde72499174427f (patch) | |
tree | c35223df2fb7c8efd7447278790c0cf495b9dfb0 /tests | |
parent | 9227528a1504ec79cf5af8e4aa15c702215abb3c (diff) | |
download | mastodon.py-2abb1f171579d7c7b4eadbe3bfde72499174427f.tar.gz |
disable follow request emails on test user
Diffstat (limited to 'tests')
-rw-r--r-- | tests/setup.sql | 19 | ||||
-rw-r--r-- | tests/test_follow_requests.py | 3 |
2 files changed, 19 insertions, 3 deletions
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 @@ | |||
1 | DELETE FROM settings WHERE id = 1234567890123456; | ||
1 | DELETE FROM oauth_access_tokens WHERE id = 6543210987654321; | 2 | DELETE FROM oauth_access_tokens WHERE id = 6543210987654321; |
2 | DELETE FROM oauth_access_tokens WHERE id = 1234567890123456; | 3 | DELETE FROM oauth_access_tokens WHERE id = 1234567890123456; |
3 | DELETE FROM oauth_applications WHERE id = 1234567890123456; | 4 | DELETE FROM oauth_applications WHERE id = 1234567890123456; |
@@ -84,3 +85,21 @@ INSERT INTO oauth_access_tokens ( | |||
84 | 1, | 85 | 1, |
85 | now() | 86 | now() |
86 | ); | 87 | ); |
88 | |||
89 | INSERT INTO settings ( | ||
90 | id, | ||
91 | var, | ||
92 | value, | ||
93 | thing_type, | ||
94 | thing_id, | ||
95 | created_at, | ||
96 | updated_at | ||
97 | ) VALUES ( | ||
98 | 1234567890123456, | ||
99 | 'notification_emails', | ||
100 | E'---\nfollow_request: false', | ||
101 | 'User', | ||
102 | 1234567890123456, | ||
103 | now(), | ||
104 | now() | ||
105 | ) | ||
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): | |||
6 | assert isinstance(reqs, list) | 6 | assert isinstance(reqs, list) |
7 | 7 | ||
8 | 8 | ||
9 | # warning: these two send emails, which open in letter opener by default | ||
10 | # so if you are re-recording a cassette for either of these mastodon will | ||
11 | # probably open a browser window for you, which you can safely close | ||
12 | @pytest.mark.vcr() | 9 | @pytest.mark.vcr() |
13 | def test_follow_request_authorize(api, api2): | 10 | def test_follow_request_authorize(api, api2): |
14 | api2.account_follow(1234567890123456) | 11 | api2.account_follow(1234567890123456) |