def validate(self, data): """ get_facebook_user method returns dict with id and email or raise error """ if 'redirect_uri' in data: redirect_uri = data['redirect_uri'] else: redirect_uri = settings.FACEBOOK_REDIRECT_URI dic = User.get_facebook_user(data['code'], redirect_uri) for k, v in dic.items(): data[k] = v return data
def test01(self, client): dic = User.get_facebook_user(self.get_code(), settings.FACEBOOK_REDIRECT_URI) print(dic)