Mastodon.py/tests/setup.sql

195 wiersze
4.2 KiB
MySQL
Czysty Zwykły widok Historia

2018-04-18 20:00:35 +00:00
DELETE FROM settings WHERE thing_id = 1234567890123456;
2019-06-22 21:16:47 +00:00
DELETE FROM settings WHERE thing_id = 1234567890123457;
2017-11-29 20:42:20 +00:00
DELETE FROM oauth_access_tokens WHERE id = 6543210987654321;
DELETE FROM oauth_access_tokens WHERE id = 1234567890123456;
2019-06-22 21:16:47 +00:00
DELETE FROM oauth_access_tokens WHERE id = 1234567890123457;
2017-11-29 20:42:20 +00:00
DELETE FROM oauth_applications WHERE id = 1234567890123456;
DELETE FROM users WHERE id = 1234567890123456;
2019-06-22 21:16:47 +00:00
DELETE FROM users WHERE id = 1234567890123457;
2017-11-29 20:42:20 +00:00
DELETE FROM accounts WHERE id = 1234567890123456;
2019-06-22 21:16:47 +00:00
DELETE FROM accounts WHERE id = 1234567890123457;
2017-11-29 20:42:20 +00:00
2022-11-10 22:21:00 +00:00
UPDATE accounts SET
locked = 't'
WHERE username = 'mastodonpy_test';
2017-11-29 20:42:20 +00:00
2022-11-10 22:21:00 +00:00
UPDATE users SET
locale = 'ja' -- japanese locale for unicode testing :p
WHERE email = 'mastodonpy_test@localhost:3000';
2017-11-29 20:42:20 +00:00
2022-11-10 22:21:00 +00:00
UPDATE accounts SET
locked = 'f',
discoverable = 't'
WHERE username = 'mastodonpy_test_2';
2019-06-22 21:16:47 +00:00
2022-11-10 22:21:00 +00:00
UPDATE users SET
locale = 'ja', -- japanese locale for unicode testing :p
encrypted_password = '$2a$10$8eAdhF69RiZiV0puZ.8iOOgMqBACmwJu8Z9X4CiN91iwRXbeC2jvi'
WHERE email = 'mastodonpy_test_2@localhost:3000';
2017-11-29 20:42:20 +00:00
2022-11-27 00:43:22 +00:00
UPDATE users SET
locale = 'de',
encrypted_password = '$2a$10$8eAdhF69RiZiV0puZ.8iOOgMqBACmwJu8Z9X4CiN91iwRXbeC2jvi'
WHERE email = 'zerocool@example.com';
2017-11-29 20:42:20 +00:00
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',
2019-06-22 20:09:44 +00:00
'read write follow push admin:read admin:write',
2017-11-29 20:42:20 +00:00
'User',
2022-11-10 22:21:00 +00:00
(SELECT id FROM users WHERE email = 'mastodonpy_test@localhost:3000'),
2017-11-29 20:42:20 +00:00
now(),
now()
);
2019-06-22 21:16:47 +00:00
INSERT INTO oauth_access_tokens (
2017-11-29 20:42:20 +00:00
id,
token,
scopes,
application_id,
resource_owner_id,
created_at
2017-11-29 20:42:20 +00:00
) VALUES (
1234567890123456,
'__MASTODON_PY_TEST_ACCESS_TOKEN',
'read write follow push',
2017-11-29 20:42:20 +00:00
1234567890123456,
2022-11-10 22:21:00 +00:00
(SELECT id FROM users WHERE email = 'mastodonpy_test@localhost:3000'),
2017-11-29 20:42:20 +00:00
now()
2019-06-22 21:16:47 +00:00
),
(
1234567890123457,
'__MASTODON_PY_TEST_ACCESS_TOKEN_3',
'read write follow push',
1234567890123456,
2022-11-10 22:21:00 +00:00
(SELECT id FROM users WHERE email = 'mastodonpy_test_2@localhost:3000'),
2019-06-22 21:16:47 +00:00
now()
),
(
2017-11-29 20:42:20 +00:00
6543210987654321,
'__MASTODON_PY_TEST_ACCESS_TOKEN_2',
'read write follow push admin:read admin:write',
2017-11-29 20:42:20 +00:00
1234567890123456,
1,
now()
2017-11-29 20:42:20 +00:00
);
INSERT INTO settings (
id,
var,
value,
thing_type,
thing_id,
created_at,
updated_at
) VALUES (
1234567890123456,
'notification_emails',
E'---\nfollow_request: false',
'User',
2022-11-10 22:21:00 +00:00
(SELECT id FROM users WHERE email = 'mastodonpy_test@localhost:3000'),
now(),
now()
2018-04-18 20:00:35 +00:00
);
INSERT INTO settings (
id,
var,
value,
thing_type,
thing_id,
created_at,
updated_at
) VALUES (
1234567890123457,
'default_privacy',
E'--- public\n...\n',
'User',
2022-11-10 22:21:00 +00:00
(SELECT id FROM users WHERE email = 'mastodonpy_test@localhost:3000'),
2018-04-18 20:00:35 +00:00
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',
2022-11-10 22:21:00 +00:00
(SELECT id FROM users WHERE email = 'mastodonpy_test@localhost:3000'),
2018-04-18 20:00:35 +00:00
now(),
now()
);
2019-06-22 21:16:47 +00:00
INSERT INTO settings (
id,
var,
value,
thing_type,
thing_id,
created_at,
updated_at
) VALUES (
1234567890123459,
'notification_emails',
E'---\nfollow_request: false',
'User',
2022-11-10 22:21:00 +00:00
(SELECT id FROM users WHERE email = 'mastodonpy_test_2@localhost:3000'),
2019-06-22 21:16:47 +00:00
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',
2022-11-10 22:21:00 +00:00
(SELECT id FROM users WHERE email = 'mastodonpy_test_2@localhost:3000'),
2019-06-22 21:16:47 +00:00
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',
2022-11-10 22:21:00 +00:00
(SELECT id FROM users WHERE email = 'mastodonpy_test_2@localhost:3000'),
2019-06-22 21:16:47 +00:00
now(),
now()
);