Create a new mock object. Args: # class_to_mock: the class to be mocked class_to_mock: class Returns: MockObject that can be used as the class_to_mock would be.
(self, class_to_mock)
| 162 | self.stubs = stubout.StubOutForTesting() |
| 163 | |
| 164 | def CreateMock(self, class_to_mock): |
| 165 | """Create a new mock object. |
| 166 | |
| 167 | Args: |
| 168 | # class_to_mock: the class to be mocked |
| 169 | class_to_mock: class |
| 170 | |
| 171 | Returns: |
| 172 | MockObject that can be used as the class_to_mock would be. |
| 173 | """ |
| 174 | |
| 175 | new_mock = MockObject(class_to_mock) |
| 176 | self._mock_objects.append(new_mock) |
| 177 | return new_mock |
| 178 | |
| 179 | def CreateMockAnything(self): |
| 180 | """Create a mock that will accept any method calls. |
no test coverage detected