diff options
author | Lorenz Diener <[email protected]> | 2017-11-30 16:02:52 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2017-11-30 16:02:52 +0100 |
commit | 7e3a4a17a28f52b186e6453a0d1f43614f110b4b (patch) | |
tree | 48aafcc35397205d52613cc305dc6baff1cbbda1 /tests/setup.sql | |
parent | c6f1196ddc1899e64d60b102e1cfa1c1c1321e77 (diff) | |
parent | d87ada3d73de69ba371acaeca55751e2410c3786 (diff) | |
download | mastodon.py-7e3a4a17a28f52b186e6453a0d1f43614f110b4b.tar.gz |
Merge pull request #113 from codl/more-tests
More tests!
Diffstat (limited to 'tests/setup.sql')
-rw-r--r-- | tests/setup.sql | 105 |
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 @@ | |||
1 | DELETE FROM settings WHERE id = 1234567890123456; | ||
2 | DELETE FROM oauth_access_tokens WHERE id = 6543210987654321; | ||
3 | DELETE FROM oauth_access_tokens WHERE id = 1234567890123456; | ||
4 | DELETE FROM oauth_applications WHERE id = 1234567890123456; | ||
5 | DELETE FROM users WHERE id = 1234567890123456; | ||
6 | DELETE FROM accounts WHERE id = 1234567890123456; | ||
7 | |||
8 | INSERT 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 | |||
22 | INSERT 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 | |||
42 | INSERT 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 | |||
66 | INSERT 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 | |||
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 | ) | ||