On Mon, Dec 5, 2011 at 10:52 AM, anthony tresontani
<dev.tresont...@gmail.com> wrote:
> I am using Django 1.3, django-nose, sqlite inmemory database.
>
> I tried with TestCase,TransactionTestCase, commit_on_success
> (decorator and context manager) and commit_manually. None of them
> worked.

i'm successfully testing transaction rollbacks.  I use
commit_on_success decorator, but only because it was the easiest way
to express my needs.  manually and/or context managers seem to work
too, but haven't tried.

at first it didn't work, but simply switching those tests to inherit
from TransactionTestCase instead of the usual TestCase did the trick.
that's with SQLite3 in-memory database for tests and MySQL InnoDB for
deployment.

I haven't used django-nose, so that might be a difference.


> Am I doing or expecting something wrong?

mostly expecting people to magically get insights on your code without
seeing it.

to get anything beyond "works for me", you'll have to show some code
and what you're expecting/getting.


-- 
Javier

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to