aboutsummaryrefslogblamecommitdiff
blob: 6239eb3438d5ac00aaf929e311a5a5d6a089c10e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                        
                                        




















                                 
WITH new_app AS (
    INSERT INTO oauth_applications (
            name,
            uid,
            secret,
            redirect_uri,
            scopes,
            owner_type,
            owner_id,
            created_at,
            updated_at
        ) VALUES (
            'Mastodon.py test suite',
            '__MASTODON_PY_TEST_ID',
            '__MASTODON_PY_TEST_SECRET',
            'urn:ietf:wg:oauth:2.0:oob',
            'read write follow',
            'User',
            1,
            now(),
            now()
        )
    RETURNING id
)
INSERT INTO oauth_access_tokens (
    token,
    scopes,
    application_id,
    resource_owner_id,
    created_at
) SELECT
    '__MASTODON_PY_TEST_TOKEN',
    'read write follow',
    new_app.id,
    1,
    now()
FROM new_app;
Powered by cgit v1.2.3 (git 2.41.0)