Exemplo n.º 1
0
def test_clean_response():
    atr = AccessTokenResponse(
        access_token="access_token",
        token_type="bearer",
        expires_in=600,
        refresh_token="refresh",
        steps=39,
        stalls="yes",
    )

    catr = clean_response(atr)
    atr_keys = atr.keys()
    catr_keys = catr.keys()
    assert _eq(
        atr_keys,
        [
            "token_type",
            "access_token",
            "expires_in",
            "refresh_token",
            "steps",
            "stalls",
        ],
    )
    assert _eq(catr_keys,
               ["token_type", "access_token", "expires_in", "refresh_token"])
Exemplo n.º 2
0
def test_clean_response():
    atr = AccessTokenResponse(access_token="access_token",
                              token_type="bearer", expires_in=600,
                              refresh_token="refresh", steps=39, stalls="yes")

    catr = clean_response(atr)
    atr_keys = atr.keys()
    catr_keys = catr.keys()
    assert _eq(atr_keys, ['token_type', 'access_token', 'expires_in',
                          'refresh_token', 'steps', 'stalls'])
    assert _eq(catr_keys, ['token_type', 'access_token', 'expires_in',
                           'refresh_token'])
Exemplo n.º 3
0
def test_clean_response():
    atr = AccessTokenResponse(access_token="access_token",
                              token_type="bearer", expires_in=600,
                              refresh_token="refresh", steps=39, stalls="yes")

    catr = clean_response(atr)
    atr_keys = atr.keys()
    catr_keys = catr.keys()
    assert _eq(atr_keys, ['token_type', 'access_token', 'expires_in',
                          'refresh_token', 'steps', 'stalls'])
    assert _eq(catr_keys, ['token_type', 'access_token', 'expires_in',
                           'refresh_token'])