aboutsummaryrefslogtreecommitdiff
blob: c9e908d392ff18387213d9e79d13def134900bc9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
DELETE FROM settings WHERE thing_id = 1234567890123456;
DELETE FROM settings WHERE thing_id = 1234567890123457;
DELETE FROM oauth_access_tokens WHERE id = 6543210987654321;
DELETE FROM oauth_access_tokens WHERE id = 1234567890123456;
DELETE FROM oauth_access_tokens WHERE id = 1234567890123457;
DELETE FROM oauth_applications WHERE id = 1234567890123456;
DELETE FROM users WHERE id = 1234567890123456;
DELETE FROM users WHERE id = 1234567890123457;
DELETE FROM accounts WHERE id = 1234567890123456;
DELETE FROM accounts WHERE id = 1234567890123457;

UPDATE accounts SET
    locked = 't'
WHERE username = 'mastodonpy_test';

UPDATE users SET 
    locale = 'ja'  -- japanese locale for unicode testing :p
WHERE email = 'mastodonpy_test@localhost:3000';

UPDATE accounts SET
    locked = 'f',
    discoverable = 't'
WHERE username = 'mastodonpy_test_2';

UPDATE users SET
    locale = 'ja',  -- japanese locale for unicode testing :p
    encrypted_password = '$2a$10$8eAdhF69RiZiV0puZ.8iOOgMqBACmwJu8Z9X4CiN91iwRXbeC2jvi'
WHERE email = 'mastodonpy_test_2@localhost:3000';

INSERT INTO oauth_applications (
    id,
    name,
    uid,
    secret,
    redirect_uri,
    scopes,
    owner_type,
    owner_id,
    created_at,
    updated_at
) VALUES (
    1234567890123456,
    'Mastodon.py test suite',
    '__MASTODON_PY_TEST_CLIENT_ID',
    '__MASTODON_PY_TEST_CLIENT_SECRET',
    'urn:ietf:wg:oauth:2.0:oob',
    'read write follow push admin:read admin:write',
    'User',
    (SELECT id FROM users WHERE email = 'mastodonpy_test@localhost:3000'),
    now(),
    now()
);

INSERT INTO oauth_access_tokens (
    id,
    token,
    scopes,
    application_id,
    resource_owner_id,
    created_at
) VALUES (
    1234567890123456,
    '__MASTODON_PY_TEST_ACCESS_TOKEN',
    'read write follow push',
    1234567890123456,
    (SELECT id FROM users WHERE email = 'mastodonpy_test@localhost:3000'),
    now()
),
(
    1234567890123457,
    '__MASTODON_PY_TEST_ACCESS_TOKEN_3',
    'read write follow push',
    1234567890123456,
    (SELECT id FROM users WHERE email = 'mastodonpy_test_2@localhost:3000'),
    now()
),
(
    6543210987654321,
    '__MASTODON_PY_TEST_ACCESS_TOKEN_2',
    'read write follow push admin:read admin:write',
    1234567890123456,
    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',
    (SELECT id FROM users WHERE email = 'mastodonpy_test@localhost:3000'),
    now(),
    now()
);
INSERT INTO settings (
    id, 
    var, 
    value, 
    thing_type,
    thing_id,
    created_at,
    updated_at
) VALUES (
    1234567890123457, 
    'default_privacy', 
    E'--- public\n...\n', 
    'User',
    (SELECT id FROM users WHERE email = 'mastodonpy_test@localhost:3000'),
    now(),
    now()
);
INSERT INTO settings (
    id, 
    var, 
    value, 
    thing_type,
    thing_id,    
    created_at, 
    updated_at
) VALUES (
    1234567890123458,
    'default_sensitive',
    E'--- false\n...\n',
    'User',
    (SELECT id FROM users WHERE email = 'mastodonpy_test@localhost:3000'),
    now(),
    now()
);


INSERT INTO settings (
    id,
    var,
    value,
    thing_type,
    thing_id,
    created_at,
    updated_at
) VALUES (
    1234567890123459,
    'notification_emails',
    E'---\nfollow_request: false',
    'User',
    (SELECT id FROM users WHERE email = 'mastodonpy_test_2@localhost:3000'),
    now(),
    now()
);
INSERT INTO settings (
    id, 
    var, 
    value, 
    thing_type,
    thing_id,
    created_at,
    updated_at
) VALUES (
    1234567890123460, 
    'default_privacy', 
    E'--- public\n...\n', 
    'User',
    (SELECT id FROM users WHERE email = 'mastodonpy_test_2@localhost:3000'),
    now(),
    now()
);
INSERT INTO settings (
    id, 
    var, 
    value, 
    thing_type,
    thing_id,    
    created_at, 
    updated_at
) VALUES (
    1234567890123461,
    'default_sensitive',
    E'--- false\n...\n',
    'User',
    (SELECT id FROM users WHERE email = 'mastodonpy_test_2@localhost:3000'),
    now(),
    now()
);
Powered by cgit v1.2.3 (git 2.41.0)