collorg/halfORM

Test models

Closed this issue · 1 comments

It would be very interesting to be able to mock models. When I mock the database connection, it should be able to adapt the factory and see that it is a mock, so we can avoid raising the UnknownRelation.

raise model_errors.UnknownRelation(sfqrn)

halfORM is not an ORM.

halfORM is a relation object mapper. It would be pointless to mock the model as the only thing halfORM is aware of IS the model. halfORM provides the HoTestCase class (see https://github.com/collorg/halfORM/blob/master/half_orm/hotest.py) for this purpose.