Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow runtime_attrs to be patched using patch_attribute (#307)
Summary: **What:** Updated `patch_attribute`'s callable patch detection to not run on `StrictMock` `runtime_attrs`. **Why:** `patch_attribute` doesn't currently work on runtime attributes, as`getattr(template_class, attribute)` will fail. **How:** Adding an additional conditional for `runtime_attrs` to the check for callable detection. **Risks:** None that I can think of. **Checklist**: <!-- Have you done all of these things? To check an item, place an "x" in the box like so: "- [x] Tests" Add "N/A" to the end of each line that's irrelevant to your changes --> - [x] Added tests, if you've added code that should be tested - [x] Updated the documentation, if you've changed APIs - [x] Ensured the test suite passes - [x] Made sure your code lints - [x] Completed the Contributor License Agreement ("CLA") Pull Request resolved: #307 Reviewed By: lsiudut Differential Revision: D29675675 Pulled By: deathowl fbshipit-source-id: fb877dfcc815b4a974f25021a4d023bd57b4a700
- Loading branch information