Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I've seem failures like Failure in test testLocate (zodbbrowser.tests.test_browser.TestZodbInfoViewWithRealDb) Traceback (most recent call last): Module unittest, line 279, in run testMethod() Module zodbbrowser.tests.test_browser, line 216, in testLocate "partial_oid": 1}) Module unittest, line 350, in failUnlessEqual (msg or '%r != %r' % (first, second)) AssertionError: {u'error': u'Not found: /stub/nonexistent', u'partial_oid': 2, u'partial_url': u'@@zodbbrowser?oid=0x2', u'partial_path': u'/stub'} != {'error': 'Not found: /stub/nonexistent', 'partial_oid': 1, 'partial_url': '@@zodbbrowser?oid=0x1', 'partial_path': '/stub'} I suspect these happens because I'm adding three persistent objects to the DB in a single transaction, and the order of OID allocation might depend on dictionary iteration order, which is not constant. Calling connection.add() on the /stub object should force its OID to be 0x1, which is what the test expects.
- Loading branch information