Return a "loose" mock, meaning it has no spec to constrain calls on it. Additional keyword arguments are passed through to Mock(). If called without a name, it is assigned the name of the fixture.
(request: FixtureRequest, name: str | None = None, **kwargs: Any)
| 88 | |
| 89 | |
| 90 | def loose_mock(request: FixtureRequest, name: str | None = None, **kwargs: Any): |
| 91 | """Return a "loose" mock, meaning it has no spec to constrain calls on it. |
| 92 | |
| 93 | Additional keyword arguments are passed through to Mock(). If called without a name, |
| 94 | it is assigned the name of the fixture. |
| 95 | """ |
| 96 | return Mock(name=request.fixturename if name is None else name, **kwargs) |
| 97 | |
| 98 | |
| 99 | def method_mock( |
no outgoing calls
searching dependent graphs…