MCPcopy Create free account
hub / github.com/authlib/authlib / client

Function client

tests/flask/test_oauth2/conftest.py:64–81  ·  view source on GitHub ↗
(db, user)

Source from the content-addressed store, hash-verified

62
63@pytest.fixture
64def client(db, user):
65 client = Client(
66 user_id=user.id,
67 client_id="client-id",
68 client_secret="client-secret",
69 )
70 client.set_client_metadata(
71 {
72 "redirect_uris": ["https://client.test/authorized"],
73 "scope": "profile",
74 "grant_types": ["authorization_code"],
75 "response_types": ["code"],
76 }
77 )
78 db.session.add(client)
79 db.session.commit()
80 yield client
81 db.session.delete(client)
82
83
84@pytest.fixture

Callers

nothing calls this directly

Calls 3

set_client_metadataMethod · 0.80
ClientClass · 0.70
deleteMethod · 0.45

Tested by

no test coverage detected