Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can you write the tests so that you create object instances and not save them to a database at all? You don't need to test the ORM and database, after all, just your code.


The closer you keep things to production, the more likely you are to catch errors that will occur on production.


unit tests, yeah, but if you try to get "the most bang for the buck" in like "test a lot with zero/little effort" you'll end up with a layer of "integration tests": that (1) set stuff in db, (2) do stuff, (3) read stuff from db and assert its correctness... A sane ORM would not actively hinder this scenario even cross-dbs or with memory-mocked-dbs, but Django's does!


I don't see the issue - you're asking it to support a feature of one database on another, something it never claims to do. You need to use the same database for testing that you use in production.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: