Esempio n. 1
0
    def test_simpleassert(self):
        """test description
        """
        einstein = Individual('einstein')

        Session.commit()

        ind1 = Individual.get_by(name = 'einstein')
        assert ind1 == einstein
Esempio n. 2
0
    def test_simpleassert(self):
        """test description
        """
        einstein = Individual('einstein')

        Session.commit()

        ind1 = Individual.get_by(name='einstein')
        assert ind1 == einstein
Esempio n. 3
0
 def test_exception(self):
     me = Individual('giuseppe')
     me_again = Individual('giuseppe')
     self.assertRaises(IntegrityError, Session.commit)
     Session.rollback()
Esempio n. 4
0
 def test_session(self):
     assert Session.connection().dialect.name is 'sqlite'
Esempio n. 5
0
 def test_exception(self):
     me = Individual('giuseppe')
     me_again = Individual('giuseppe')
     self.assertRaises(IntegrityError, Session.commit)
     Session.rollback()
Esempio n. 6
0
 def test_session(self):
     assert Session.connection().dialect.name is 'sqlite'