def assert_called ( _mock_self ) : self = _mock_self if self . call_count == 0 : msg = ( "Expected '%s' to have been called." % self . _mock_name or 'mock' ) raise AssertionError ( msg )
python mock mark a test as expected failure
assert that the mock was called at least once
def assert_called(_mock_self):
        """assert that the mock was called at least once
        """
        self = _mock_self
        if self.call_count == 0:
            msg = ("Expected '%s' to have been called." %
                   self._mock_name or 'mock')
            raise AssertionError(msg)