MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST

Function TEST

tensorflow/core/platform/cloud/oauth_client_test.cc:51–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49} // namespace
50
51TEST(OAuthClientTest, ParseOAuthResponse) {
52 const uint64 request_timestamp = 100;
53 string token;
54 uint64 expiration_timestamp;
55 TF_EXPECT_OK(OAuthClient().ParseOAuthResponse(kTokenJson, request_timestamp,
56 &token, &expiration_timestamp));
57 EXPECT_EQ("1/fFAGRNJru1FTz70BzhT3Zg", token);
58 EXPECT_EQ(4020, expiration_timestamp);
59}
60
61TEST(OAuthClientTest, GetTokenFromRefreshTokenJson) {
62 const string credentials_json = R"(

Callers

nothing calls this directly

Calls 14

OAuthClientClass · 0.85
ScannerClass · 0.85
Base64DecodeFunction · 0.85
ParseOAuthResponseMethod · 0.80
c_strMethod · 0.80
JoinPathFunction · 0.50
TensorFlowSrcRootFunction · 0.50
parseMethod · 0.45
GetResultMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected