def test_should_know_when_it_is_valid(self): token = Token(access_token='access_token', expires_on=Token.calc_expires_on(10)) self.assertTrue(token.is_valid(), self.storage_obj)
def test_should_know_when_it_has_expired(self): token = Token(access_token='access_token', expires_on=0) self.assertFalse(token.is_valid(), self.storage_obj)
def test_should_know_when_it_is_valid(self): token = Token(access_token='access_token', expires_in=10) self.assertTrue(token.is_valid())
def test_should_know_when_it_has_expired(self): token = Token(access_token='access_token', expires_in=0) self.assertFalse(token.is_valid())
def test_should_know_when_it_is_valid(self): token = Token(access_token='access_token', expires_in=10) self.assertTrue(token.is_valid())
def test_should_know_when_it_is_valid(self): token = Token(access_token='access_token', expires_on=Token.calc_expires_on(10)) self.assertTrue(token.is_valid(), self.storage_obj)