Can someone show me how to write unit tests for sqlalchemy model I created using nose.
I just need one simple example.
Thanks.
Can someone show me how to write unit tests for sqlalchemy model I created using nose.
I just need one simple example.
Thanks.
Check out the fixture project. We used nose to test that and it's also a way to declaratively define data to test against, there will be some extensive examples for you to use there!
See also fixture documentation.
You can simply create an in-memory SQLite database and bind your session to that.
Example: