)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"df51ebb0e319d35cd85d8fae427a910a0e4343c5","unresolved":false,"context_lines":[{"line_number":15,"context_line":"@functools.wraps; and the object passed to `before` and `after` was"},{"line_number":16,"context_line":"either that same thing or simply the inner _spy wrapper method. Those"},{"line_number":17,"context_line":"have characteristics which may have resulted in bizarre side effects"},{"line_number":18,"context_line":"down the road."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"So this commit instead creates a clean, empty object to pass around."},{"line_number":21,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3fa7e38b_c57ea6ae","line":18,"updated":"2019-10-02 13:54:20.000000000","message":"I only see possible side effects if the test using the spy actually go and dig into the spy object internals. But that would be the problem of the test itself. In python you cannot hide internals so why trying.","commit_id":"0cd35ac2a4747bfce0df879ba3f98f4b75e31231"}],"nova/tests/spy.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"df51ebb0e319d35cd85d8fae427a910a0e4343c5","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def _generate_spy(original, before\u003dNone, after\u003dNone):"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    data \u003d _Data()"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    @functools.wraps(original)"},{"line_number":27,"context_line":"    def _spy(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_a5660a29","line":24,"updated":"2019-10-02 13:54:20.000000000","message":"Both data and _spy are defined at the same place, accessible the same way. So I don\u0027t see the reason why data is better than _spy for this purpose","commit_id":"0cd35ac2a4747bfce0df879ba3f98f4b75e31231"}]}
