diff options
author | halcy <halcy@ARARAGI-KUN> | 2022-11-11 00:21:00 +0200 |
---|---|---|
committer | halcy <halcy@ARARAGI-KUN> | 2022-11-11 00:21:00 +0200 |
commit | 78a1c174688d51040d76fce0b9bc7693ec985a97 (patch) | |
tree | e1e9dfe35d35eee58db5f47c529697de794e47fc /tests/setup.sql | |
parent | 6e170393e6a044d9d6981a15d94b7cdada97aac4 (diff) | |
download | mastodon.py-78a1c174688d51040d76fce0b9bc7693ec985a97.tar.gz |
Fix tests
Diffstat (limited to 'tests/setup.sql')
-rw-r--r-- | tests/setup.sql | 96 |
1 files changed, 23 insertions, 73 deletions
diff --git a/tests/setup.sql b/tests/setup.sql index c747237..c9e908d 100644 --- a/tests/setup.sql +++ b/tests/setup.sql | |||
@@ -9,73 +9,23 @@ DELETE FROM users WHERE id = 1234567890123457; | |||
9 | DELETE FROM accounts WHERE id = 1234567890123456; | 9 | DELETE FROM accounts WHERE id = 1234567890123456; |
10 | DELETE FROM accounts WHERE id = 1234567890123457; | 10 | DELETE FROM accounts WHERE id = 1234567890123457; |
11 | 11 | ||
12 | INSERT INTO accounts ( | 12 | UPDATE accounts SET |
13 | id, | 13 | locked = 't' |
14 | username, | 14 | WHERE username = 'mastodonpy_test'; |
15 | locked, | ||
16 | created_at, | ||
17 | updated_at | ||
18 | ) VALUES ( | ||
19 | 1234567890123456, | ||
20 | 'mastodonpy_test', | ||
21 | 't', | ||
22 | now(), | ||
23 | now() | ||
24 | ); | ||
25 | 15 | ||
26 | INSERT INTO users ( | 16 | UPDATE users SET |
27 | id, | 17 | locale = 'ja' -- japanese locale for unicode testing :p |
28 | email, | 18 | WHERE email = 'mastodonpy_test@localhost:3000'; |
29 | account_id, | ||
30 | created_at, | ||
31 | updated_at, | ||
32 | confirmed_at, | ||
33 | locale | ||
34 | ) VALUES ( | ||
35 | 1234567890123456, | ||
36 | 'mastodonpy_test@localhost:3000', | ||
37 | 1234567890123456, | ||
38 | now(), | ||
39 | now(), | ||
40 | now(), | ||
41 | 'ja' -- japanese locale for unicode testing :p | ||
42 | ); | ||
43 | 19 | ||
44 | INSERT INTO accounts ( | 20 | UPDATE accounts SET |
45 | id, | 21 | locked = 'f', |
46 | username, | 22 | discoverable = 't' |
47 | locked, | 23 | WHERE username = 'mastodonpy_test_2'; |
48 | created_at, | ||
49 | updated_at, | ||
50 | discoverable | ||
51 | ) VALUES ( | ||
52 | 1234567890123457, | ||
53 | 'mastodonpy_test_2', | ||
54 | 'f', | ||
55 | now(), | ||
56 | now(), | ||
57 | 't' | ||
58 | ); | ||
59 | 24 | ||
60 | INSERT INTO users ( | 25 | UPDATE users SET |
61 | id, | 26 | locale = 'ja', -- japanese locale for unicode testing :p |
62 | email, | 27 | encrypted_password = '$2a$10$8eAdhF69RiZiV0puZ.8iOOgMqBACmwJu8Z9X4CiN91iwRXbeC2jvi' |
63 | account_id, | 28 | WHERE email = 'mastodonpy_test_2@localhost:3000'; |
64 | created_at, | ||
65 | updated_at, | ||
66 | confirmed_at, | ||
67 | locale, | ||
68 | encrypted_password | ||
69 | ) VALUES ( | ||
70 | 1234567890123457, | ||
71 | 'mastodonpy_test_2@localhost:3000', | ||
72 | 1234567890123457, | ||
73 | now(), | ||
74 | now(), | ||
75 | now(), | ||
76 | 'ja', -- japanese locale for unicode testing :p | ||
77 | '$2a$10$8eAdhF69RiZiV0puZ.8iOOgMqBACmwJu8Z9X4CiN91iwRXbeC2jvi' | ||
78 | ); | ||
79 | 29 | ||
80 | INSERT INTO oauth_applications ( | 30 | INSERT INTO oauth_applications ( |
81 | id, | 31 | id, |
@@ -96,7 +46,7 @@ INSERT INTO oauth_applications ( | |||
96 | 'urn:ietf:wg:oauth:2.0:oob', | 46 | 'urn:ietf:wg:oauth:2.0:oob', |
97 | 'read write follow push admin:read admin:write', | 47 | 'read write follow push admin:read admin:write', |
98 | 'User', | 48 | 'User', |
99 | 1234567890123456, | 49 | (SELECT id FROM users WHERE email = 'mastodonpy_test@localhost:3000'), |
100 | now(), | 50 | now(), |
101 | now() | 51 | now() |
102 | ); | 52 | ); |
@@ -113,7 +63,7 @@ INSERT INTO oauth_access_tokens ( | |||
113 | '__MASTODON_PY_TEST_ACCESS_TOKEN', | 63 | '__MASTODON_PY_TEST_ACCESS_TOKEN', |
114 | 'read write follow push', | 64 | 'read write follow push', |
115 | 1234567890123456, | 65 | 1234567890123456, |
116 | 1234567890123456, | 66 | (SELECT id FROM users WHERE email = 'mastodonpy_test@localhost:3000'), |
117 | now() | 67 | now() |
118 | ), | 68 | ), |
119 | ( | 69 | ( |
@@ -121,7 +71,7 @@ INSERT INTO oauth_access_tokens ( | |||
121 | '__MASTODON_PY_TEST_ACCESS_TOKEN_3', | 71 | '__MASTODON_PY_TEST_ACCESS_TOKEN_3', |
122 | 'read write follow push', | 72 | 'read write follow push', |
123 | 1234567890123456, | 73 | 1234567890123456, |
124 | 1234567890123457, | 74 | (SELECT id FROM users WHERE email = 'mastodonpy_test_2@localhost:3000'), |
125 | now() | 75 | now() |
126 | ), | 76 | ), |
127 | ( | 77 | ( |
@@ -146,7 +96,7 @@ INSERT INTO settings ( | |||
146 | 'notification_emails', | 96 | 'notification_emails', |
147 | E'---\nfollow_request: false', | 97 | E'---\nfollow_request: false', |
148 | 'User', | 98 | 'User', |
149 | 1234567890123456, | 99 | (SELECT id FROM users WHERE email = 'mastodonpy_test@localhost:3000'), |
150 | now(), | 100 | now(), |
151 | now() | 101 | now() |
152 | ); | 102 | ); |
@@ -163,7 +113,7 @@ INSERT INTO settings ( | |||
163 | 'default_privacy', | 113 | 'default_privacy', |
164 | E'--- public\n...\n', | 114 | E'--- public\n...\n', |
165 | 'User', | 115 | 'User', |
166 | 1234567890123456, | 116 | (SELECT id FROM users WHERE email = 'mastodonpy_test@localhost:3000'), |
167 | now(), | 117 | now(), |
168 | now() | 118 | now() |
169 | ); | 119 | ); |
@@ -180,7 +130,7 @@ INSERT INTO settings ( | |||
180 | 'default_sensitive', | 130 | 'default_sensitive', |
181 | E'--- false\n...\n', | 131 | E'--- false\n...\n', |
182 | 'User', | 132 | 'User', |
183 | 1234567890123456, | 133 | (SELECT id FROM users WHERE email = 'mastodonpy_test@localhost:3000'), |
184 | now(), | 134 | now(), |
185 | now() | 135 | now() |
186 | ); | 136 | ); |
@@ -199,7 +149,7 @@ INSERT INTO settings ( | |||
199 | 'notification_emails', | 149 | 'notification_emails', |
200 | E'---\nfollow_request: false', | 150 | E'---\nfollow_request: false', |
201 | 'User', | 151 | 'User', |
202 | 1234567890123457, | 152 | (SELECT id FROM users WHERE email = 'mastodonpy_test_2@localhost:3000'), |
203 | now(), | 153 | now(), |
204 | now() | 154 | now() |
205 | ); | 155 | ); |
@@ -216,7 +166,7 @@ INSERT INTO settings ( | |||
216 | 'default_privacy', | 166 | 'default_privacy', |
217 | E'--- public\n...\n', | 167 | E'--- public\n...\n', |
218 | 'User', | 168 | 'User', |
219 | 1234567890123457, | 169 | (SELECT id FROM users WHERE email = 'mastodonpy_test_2@localhost:3000'), |
220 | now(), | 170 | now(), |
221 | now() | 171 | now() |
222 | ); | 172 | ); |
@@ -233,7 +183,7 @@ INSERT INTO settings ( | |||
233 | 'default_sensitive', | 183 | 'default_sensitive', |
234 | E'--- false\n...\n', | 184 | E'--- false\n...\n', |
235 | 'User', | 185 | 'User', |
236 | 1234567890123457, | 186 | (SELECT id FROM users WHERE email = 'mastodonpy_test_2@localhost:3000'), |
237 | now(), | 187 | now(), |
238 | now() | 188 | now() |
239 | ); | 189 | ); |