def setUp(self): self.cuser = User.create_user('testconsumer', '*****@*****.**') data = dict(name=u'Piston Test Consumer', description=u'A test consumer for Piston.', session=self.session, user=self.cuser) self.consumer = Consumer.create(**data) mail.outbox = []
def setUp(self): self.session = orm.sessionmaker() self.cuser = User.create_user('testoauth', '*****@*****.**', 'testoauth') data = dict(name=u'Piston Test OAuth', description=u'A test consumer for OAuth.', session=self.session, user=self.cuser) self.consumer = Consumer.create(**data) self.old_store = getattr(settings, 'PISTON_OAUTH_STORE', None) settings.PISTON_OAUTH_STORE = BAPH_PISTON_OAUTH_STORE