aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/setup.sql')
-rw-r--r--tests/setup.sql105
1 files changed, 105 insertions, 0 deletions
diff --git a/tests/setup.sql b/tests/setup.sql
new file mode 100644
index 0000000..0ff6da0
--- /dev/null
+++ b/tests/setup.sql
@@ -0,0 +1,105 @@
1DELETE FROM settings WHERE id = 1234567890123456;
2DELETE FROM oauth_access_tokens WHERE id = 6543210987654321;
3DELETE FROM oauth_access_tokens WHERE id = 1234567890123456;
4DELETE FROM oauth_applications WHERE id = 1234567890123456;
5DELETE FROM users WHERE id = 1234567890123456;
6DELETE FROM accounts WHERE id = 1234567890123456;
7
8INSERT INTO accounts (
9 id,
10 username,
11 locked,
12 created_at,
13 updated_at
14) VALUES (
15 1234567890123456,
16 'mastodonpy_test',
17 't',
18 now(),
19 now()
20);
21
22INSERT INTO users (
23 id,
24 email,
25 account_id,
26 created_at,
27 updated_at,
28 confirmed_at,
29 locale
30) VALUES (
31 1234567890123456,
32 'mastodonpy_test@localhost:3000',
33 1234567890123456,
34 now(),
35 now(),
36 now(),
37 'ja' -- japanese locale for unicode testing :p
38);
39
40
41
42INSERT INTO oauth_applications (
43 id,
44 name,
45 uid,
46 secret,
47 redirect_uri,
48 scopes,
49 owner_type,
50 owner_id,
51 created_at,
52 updated_at
53) VALUES (
54 1234567890123456,
55 'Mastodon.py test suite',
56 '__MASTODON_PY_TEST_CLIENT_ID',
57 '__MASTODON_PY_TEST_CLIENT_SECRET',
58 'urn:ietf:wg:oauth:2.0:oob',
59 'read write follow',
60 'User',
61 1234567890123456,
62 now(),
63 now()
64);
65
66INSERT INTO oauth_access_tokens (
67 id,
68 token,
69 scopes,
70 application_id,
71 resource_owner_id,
72 created_at
73) VALUES (
74 1234567890123456,
75 '__MASTODON_PY_TEST_ACCESS_TOKEN',
76 'read write follow',
77 1234567890123456,
78 1234567890123456,
79 now()
80), (
81 6543210987654321,
82 '__MASTODON_PY_TEST_ACCESS_TOKEN_2',
83 'read write follow',
84 1234567890123456,
85 1,
86 now()
87);
88
89INSERT 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)
Powered by cgit v1.2.3 (git 2.41.0)