def define_tables(self): db = self.auth.db db.define_table( "oauth2", Field("registrant_id", "reference auth_user"), Field("client_secret"), ) db.commit()
def test_extra_fields(self): db = DAL("sqlite:memory") self.auth = Auth(self.session, db, define_tables=True, extra_fields=[Field('favorite_color')]) self.on_request() self.assertEqual(type(db.auth_user.favorite_color), Field)
def test_extra_fields(self): self.db = DAL("sqlite:memory") self.session = Session(secret="a", expiration=10) self.session.local.data = {} self.auth = Auth(self.session, self.db, define_tables=True, extra_fields=[Field('favorite_color')]) self.assertEqual(type(self.db.auth_user.favorite_color), Field)
def define_tables(self): db = self.auth.db db.define_table('oauth2', Field('registrant_id', 'reference auth_user'), Field('client_secret')) db.commit()