def testTableAlias(self): db = DAL(DEFAULT_URI, check_reserved=["all"]) persons = Table(db, "persons", Field("firstname", "string"), Field("lastname", "string")) aliens = persons.with_alias("aliens") # Are the different table instances with the same fields self.assert_(persons is not aliens) self.assert_(set(persons.fields) == set(aliens.fields))
def testTableAlias(self): db = DAL("sqlite:memory:") persons = Table(db, "persons", Field("firstname", "string"), Field("lastname", "string")) aliens = persons.with_alias("aliens") # Are the different table instances with the same fields self.assert_(persons is not aliens) self.assert_(set(persons.fields) == set(aliens.fields))
def testTableAlias(self): db = DAL('sqlite:memory:') persons = Table(db, 'persons', Field('firstname', 'string'), Field('lastname', 'string')) aliens = persons.with_alias('aliens') # Are the different table instances with the same fields self.assert_(persons is not aliens) self.assert_(set(persons.fields) == set(aliens.fields))
def testTableAlias(self): db = DAL(DEFAULT_URI, check_reserved=['all']) persons = Table(db, 'persons', Field('firstname', 'string'), Field('lastname', 'string')) aliens = persons.with_alias('aliens') # Are the different table instances with the same fields self.assert_(persons is not aliens) self.assert_(set(persons.fields) == set(aliens.fields))