MCPcopy Create free account
hub / github.com/dropbox/dbxcli / mockOAuthAppCredentials

Function mockOAuthAppCredentials

cmd/auth_test.go:176–187  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

174}
175
176func mockOAuthAppCredentials(t *testing.T) {
177 t.Helper()
178
179 restoreOAuthCredentials(t)
180 setOAuthCredentials(tokenPersonal, "personal-test-key")
181 setOAuthCredentials(tokenTeamAccess, "team-access-test-key")
182 setOAuthCredentials(tokenTeamManage, "team-manage-test-key")
183 readAppCredentials = func(tokType string) (appCredentials, error) {
184 t.Fatal("app credential prompt should not be used")
185 return appCredentials{}, nil
186 }
187}
188
189func mockAuthorization(t *testing.T, code string, accessToken string) {
190 t.Helper()

Calls 2

restoreOAuthCredentialsFunction · 0.85
setOAuthCredentialsFunction · 0.85

Tested by

no test coverage detected