Commits

Anonymous committed 7f244ba

add a transaction test to test basic transaction support in johnny

  • Participants
  • Parent commits 27fd4f4

Comments (0)

Files changed (1)

File johnny/tests/cache.py

         # enter manual transaction management
         transaction.enter_transaction_management()
         transaction.managed()
+        import ipdb; ipdb.set_trace();
 
-        start.name = 'Jackie Chan Novels'
+        start.title = 'Jackie Chan Novels'
         # local invalidation, this key should hit the localstore!
         nowlen = len(cache.local)
         start.save()
         # old gen key, and should still find the right 
         other('Genre.objects.get(id=1)')
         ostart = q.get()
-        self.failUnless(ostart.name != start.name)
+        self.failUnless(ostart.title != start.title)
         self.failUnless(len(connection.queries) == 2)
         transaction.commit()
         # now that we commit, we push the localstore keys out;  this should be
         # a cache miss, because we never read it inside the previous transaction
         other('Genre.objects.get(id=1)')
         ostart = q.get()
-        self.failUnless(ostart.name == start.name)
+        self.failUnless(ostart.title == start.title)
         self.failUnless(len(connection.queries) == 3)
         transaction.leave_transaction_management()