Here are the examples of the python api mock.call.a taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
0
Source : testhelpers.py
with GNU General Public License v3.0
from guohuadeng
with GNU General Public License v3.0
from guohuadeng
def test_recursive(self):
class A(object):
def a(self):
pass
foo = 'foo bar baz'
bar = foo
A.B = A
mock = create_autospec(A)
mock()
self.assertFalse(mock.B.called)
mock.a()
mock.B.a()
self.assertEqual(mock.method_calls, [call.a(), call.B.a()])
self.assertIs(A.foo, A.bar)
self.assertIsNot(mock.foo, mock.bar)
mock.foo.lower()
self.assertRaises(AssertionError, mock.bar.lower.assert_called_with)
def test_spec_inheritance_for_classes(self):