Init exception. Args: # unexpected_method: MockMethod that was called but was not at the head of # the expected_method queue. # expected: MockMethod or UnorderedGroup the method should have # been in. unexpected_method: MockMethod expected: MockMethod or
(self, unexpected_method, expected)
| 107 | """ |
| 108 | |
| 109 | def __init__(self, unexpected_method, expected): |
| 110 | """Init exception. |
| 111 | |
| 112 | Args: |
| 113 | # unexpected_method: MockMethod that was called but was not at the head of |
| 114 | # the expected_method queue. |
| 115 | # expected: MockMethod or UnorderedGroup the method should have |
| 116 | # been in. |
| 117 | unexpected_method: MockMethod |
| 118 | expected: MockMethod or UnorderedGroup |
| 119 | """ |
| 120 | |
| 121 | Error.__init__(self) |
| 122 | self._unexpected_method = unexpected_method |
| 123 | self._expected = expected |
| 124 | |
| 125 | def __str__(self): |
| 126 | return "Unexpected method call: %s. Expecting: %s" % \ |