def migration_needs_to_run(self):
     return DBSession.query(DataMigration).filter_by(unique_code = self.unique_code).count() == 0
Пример #2
0
 def test_query_obj(self):
     """Model objects can be queried"""
     obj = DBSession.query(self.klass).one()
     for key, value in self.attrs.iteritems():
         assert_equals(getattr(obj, key), value)