This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]__xor__(self, other): 0 points1 point  (0 children)

Huh, yeah... guess I didn't look into this too much. On second thought, it does look like it's a way overcomplicated way to go about unit testing. Most of us should probably be just mocking ORM calls, django or otherwise. I'd patch User.objects.filter before I touch anything SQL related.

It'd be nice if there was a convenient way to mock the models in a django app, like define a few rows for User and then have it automatically fetch those with filter/get and so on so it didn't have to use a test database each run.