Here are the examples of the python api unittest.mock.new_attr taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
3
Source : testmock.py
with MIT License
from godot-extended-libraries
with MIT License
from godot-extended-libraries
def test_wraps_prevents_automatic_creation_of_mocks(self):
class Real(object):
pass
real = Real()
mock = Mock(wraps=real)
self.assertRaises(AttributeError, lambda: mock.new_attr())
def test_wraps_call_with_nondefault_return_value(self):