def createView(self, obj): view = ZodbInfoView(obj, TestRequest()) view.obj = obj view.state = ZodbObjectStateStub(view.obj) view.requestedTid = None view.getRootOid = lambda: 1 return view
def createView(self, obj): view = ZodbInfoView(obj, TestRequest()) view.obj = obj view.state = ZodbObjectStateStub(view.obj) view.requestedTid = None view.getRootOid = lambda: 1 return view
def test_loadHistoricalState(self): view = ZodbInfoView(None, None) view.obj = None view.history = [{}] # injected fault: KeyError('tid') self.assertEqual(view._loadHistoricalState(), [{'state': {}, 'error': "KeyError: 'tid'"}, {'state': {}, 'error': None}])
def test_loadHistoricalState(self): view = ZodbInfoView(None, None) view.obj = None view.history = [{}] # injected fault: KeyError('tid') self.assertEqual(view._loadHistoricalState(), [{ 'state': {}, 'error': "KeyError: 'tid'" }, { 'state': {}, 'error': None }])