Raised if an unknown method is requested of the mock object.
| 128 | |
| 129 | |
| 130 | class UnknownMethodCallError(Error): |
| 131 | """Raised if an unknown method is requested of the mock object.""" |
| 132 | |
| 133 | def __init__(self, unknown_method_name): |
| 134 | """Init exception. |
| 135 | |
| 136 | Args: |
| 137 | # unknown_method_name: Method call that is not part of the mocked class's |
| 138 | # public interface. |
| 139 | unknown_method_name: str |
| 140 | """ |
| 141 | |
| 142 | Error.__init__(self) |
| 143 | self._unknown_method_name = unknown_method_name |
| 144 | |
| 145 | def __str__(self): |
| 146 | return "Method called is not a member of the object: %s" % \ |
| 147 | self._unknown_method_name |
| 148 | |
| 149 | |
| 150 | class Mox(object): |