def test_loads_DecodeError(self): _loads = Mock(name='_loads') _loads.side_effect = _DecodeError(MagicMock(), MagicMock(), MagicMock()) self.assertEqual(loads(dumps({'x': 'z'}), _loads=_loads), {'x': 'z'})
def test_loads_DecodeError(self): _loads = Mock(name='_loads') _loads.side_effect = _DecodeError( MagicMock(), MagicMock(), MagicMock()) self.assertEqual(loads(dumps({'x': 'z'}), _loads=_loads), {'x': 'z'})