import konviva
from settings import KONVIVA_API_URL


def test_konviva_token():
    token = konviva.token('sergio@somosbeta.com.br')

    assert isinstance(token, konviva.KonvivaToken)

    redirect_uri = konviva.redirect_uri(token)
    assert KONVIVA_API_URL in redirect_uri
