mock.call.__int__

Here are the examples of the python api mock.call.__int__ taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

3 Source : testmock.py
with GNU General Public License v3.0
from guohuadeng

    def test_magic_methods_mock_calls(self):
        for Klass in Mock, MagicMock:
            m = Klass()
            m.__int__ = Mock(return_value=3)
            m.__float__ = MagicMock(return_value=3.0)
            int(m)
            float(m)

            self.assertEqual(m.mock_calls, [call.__int__(), call.__float__()])
            self.assertEqual(m.method_calls, [])

    def test_mock_open_reuse_issue_21750(self):