示例#1
0
    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))
示例#2
0
    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))
示例#3
0
    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))
示例#4
0
    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))
示例#5
0
    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))
示例#6
0
    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))