def test_access_token_expires(self):
        an_minute_before_from_now = datetime.datetime.utcnow(
        ) - datetime.timedelta(minutes=1)
        access_token = AccessToken(self.foo_token,
                                   expires_at=an_minute_before_from_now)

        self.assertTrue(access_token.is_expired())
Exemplo n.º 2
0
    def test_access_token_do_not_expires(self):
        app_access_token = AccessToken(self.app_token)

        self.assertFalse(app_access_token.is_expired())