I've been working on a Django backend for MonetDB.
I'm trying to write a unit test that verifieds I curently
have a bug in how transactions are handled.
I have a couple questions about the unit test.
Here, Simple is a model with a single field "name"
that has a unique index.
s = Simple(name='mark')
s.save()
s = Simple(name='mark')
try:
s.save()
except OperationalError:
pass
# first one should be saved.
s = Simple.objects.get(name='mark')
self.assertTrue(s is not None)
Is this test look correct?
Currently it fails on the get() with the error
current transaction is aborted
(please ROLLBACK)
I should not need to call rollbak call in the
test's except clause, right?
Thanks,
Mark
It passes when using SQLite backend, so I
think the test is good.
>
> Currently it fails on the get() with the error
>
> current transaction is aborted
> (please ROLLBACK)
>
Any suggestions for what code is missing
from the MonetDB driver?
Thanks,
m