def test_to_dict_access_tkn(self): ts = TokenStore() ts.access_token = 'a' dic = ts.to_dict() self.assertEqual('a', dic.get(_ACCESS_TOKEN)) self.assertIn(_KEY_TIMESTAMP, dic.keys())
def test_to_dict_refresh_tkn(self): ts = TokenStore() ts.refresh_token = 'a' dic = ts.to_dict() self.assertEqual('a', dic.get(_REFRESH_TOKEN)) self.assertIn(_KEY_TIMESTAMP, dic.keys())
def test_to_dict_empty(self): ts = TokenStore() self.assertDictEqual({}, ts.to_dict())