def test_authentication_can_use_just_a_token(self):
        currencycloud.login_id = None
        currencycloud.api_key = None
        currencycloud.token = TestAuthentication.session_token

        session = currencycloud.session(authenticate=False)
        with Betamax(session.requests_session) as betamax:
            betamax.use_cassette('authentication/can_use_just_a_token')

            response = Beneficiary.find()

            assert response is not None
    def test_authentication_handles_session_timeout(self):
        currencycloud.token = '3907f05da86533710efc589d58f51f45'

        # WARNING!
        # we need to disable recording becouse this cassette
        # generates incompatible files among different Python versions!

        # session = currencycloud.session(authenticate=False)
        # with Betamax(session.requests_session) as betamax:
        #     betamax.use_cassette('authentication/handles_session_timeout', match_requests_on=['uri', 'method', 'headers'])  # noqa

        response = Beneficiary.find()

        assert response is not None