MCPcopy Index your code
hub / github.com/RustPython/RustPython / assert_called

Method assert_called

Lib/unittest/mock.py:948–954  ·  view source on GitHub ↗

assert that the mock was called at least once

(self)

Source from the content-addressed store, hash-verified

946 raise AssertionError(msg)
947
948 def assert_called(self):
949 """assert that the mock was called at least once
950 """
951 if self.call_count == 0:
952 msg = ("Expected '%s' to have been called." %
953 (self._mock_name or 'mock'))
954 raise AssertionError(msg)
955
956 def assert_called_once(self):
957 """assert that the mock was called only once.

Calls

no outgoing calls