Add a spec to a mock. `spec` can either be an object or a list of strings. Only attributes on the `spec` can be fetched as attributes from the mock. If `spec_set` is True then only attributes on the spec can be set.
(self, spec, spec_set=False)
| 523 | |
| 524 | |
| 525 | def mock_add_spec(self, spec, spec_set=False): |
| 526 | """Add a spec to a mock. `spec` can either be an object or a |
| 527 | list of strings. Only attributes on the `spec` can be fetched as |
| 528 | attributes from the mock. |
| 529 | |
| 530 | If `spec_set` is True then only attributes on the spec can be set.""" |
| 531 | self._mock_add_spec(spec, spec_set) |
| 532 | |
| 533 | |
| 534 | def _mock_add_spec(self, spec, spec_set, _spec_as_instance=False, |
nothing calls this directly
no test coverage detected