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