def setUp(self): self.author = User.objects.get(username='******') self.addonrev = Package.objects.get(name='test-addon', author__username='******').latest self.hashtag = hashtag() self.amo = AMOOAuth(domain=settings.AMOOAUTH_DOMAIN, port=settings.AMOOAUTH_PORT, protocol=settings.AMOOAUTH_PROTOCOL, prefix=settings.AMOOAUTH_PREFIX)
def fetch_amo_user(email): log.debug('#' * 80) amo = AMOOAuth(domain=settings.AMOOAUTH_DOMAIN, port=settings.AMOOAUTH_PORT, protocol=settings.AMOOAUTH_PROTOCOL, prefix=settings.AMOOAUTH_PREFIX) amo.set_consumer(consumer_key=settings.AMOOAUTH_CONSUMERKEY, consumer_secret=settings.AMOOAUTH_CONSUMERSECRET) return amo.get_user_by_email(email) or None