)]}'
{"oslotest/base.py":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"ede5f1b81bc7be09dfb58077886bfa2fd5d7c1d3","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                # before any addCleanup() methods have a chance to register"},{"line_number":97,"context_line":"                # other things to be cleaned up, so it is called last. This"},{"line_number":98,"context_line":"                # allows tests to register their own cleanups with a mock.stop"},{"line_number":99,"context_line":"                # method so those mocks are not included in the stopall set."},{"line_number":100,"context_line":"                super(BaseTestCase, self).addCleanup(mock.patch.stopall)"},{"line_number":101,"context_line":"        else:"},{"line_number":102,"context_line":"            raise LOG.error(\u0027Unable to patch test case. \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"dae33548_329facb5","line":99,"updated":"2016-02-16 20:37:44.000000000","message":"Please add a deprecation warning:\n\nsomething like\n if not getattr(self, \u0027__TestCase__setup_called\u0027, False):\n     warnings.warn(....)\n\n(except using debtcollector :))","commit_id":"1eb952773740add047e26fe7210a5baf2432e759"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"978250323aada9463b4431873f982622f9a27c0e","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                # before any addCleanup() methods have a chance to register"},{"line_number":97,"context_line":"                # other things to be cleaned up, so it is called last. This"},{"line_number":98,"context_line":"                # allows tests to register their own cleanups with a mock.stop"},{"line_number":99,"context_line":"                # method so those mocks are not included in the stopall set."},{"line_number":100,"context_line":"                super(BaseTestCase, self).addCleanup(mock.patch.stopall)"},{"line_number":101,"context_line":"        else:"},{"line_number":102,"context_line":"            raise LOG.error(\u0027Unable to patch test case. \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"dae33548_525fd0e4","line":99,"in_reply_to":"dae33548_329facb5","updated":"2016-02-16 20:41:01.000000000","message":"sorry, _TestCase__setup_called","commit_id":"1eb952773740add047e26fe7210a5baf2432e759"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"3a51ed607c5669e8ba6f4995ef973305c3968eb9","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                # method so those mocks are not included in the stopall set."},{"line_number":100,"context_line":"                super(BaseTestCase, self).addCleanup(mock.patch.stopall)"},{"line_number":101,"context_line":"        else:"},{"line_number":102,"context_line":"            raise LOG.error(\u0027Unable to patch test case. \u0027"},{"line_number":103,"context_line":"                            \u0027mock.patch.stopall cleanup was not registered.\u0027)"},{"line_number":104,"context_line":"        super(BaseTestCase, self).addCleanup(function, *args, **kwargs)"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"dae33548_d453ac69","line":102,"range":{"start_line":102,"start_character":12,"end_line":102,"end_character":17},"updated":"2016-02-17 11:49:32.000000000","message":"remove raise ?","commit_id":"1eb952773740add047e26fe7210a5baf2432e759"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"4a2ad64c230a3a55fa28eba1e9d76620e49c2d01","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    to verify logging behavior or counts the number of invocations. A"},{"line_number":72,"context_line":"    workaround is to overload the ``_fake_logs`` function in a base class but"},{"line_number":73,"context_line":"    this will deactivate fake logging globally."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    .. _fixtures: https://pypi.python.org/pypi/fixtures"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_5944e2b5","line":74,"updated":"2016-02-17 16:19:46.000000000","message":"This change needs documentation.","commit_id":"7f098afd2da15ea007ee707086419d71117028fa"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"6d54ffb64d8141c7cb74ebe81583e847efbac97d","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    to verify logging behavior or counts the number of invocations. A"},{"line_number":72,"context_line":"    workaround is to overload the ``_fake_logs`` function in a base class but"},{"line_number":73,"context_line":"    this will deactivate fake logging globally."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    .. _fixtures: https://pypi.python.org/pypi/fixtures"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_9b1e5a6e","line":74,"in_reply_to":"dae33548_5944e2b5","updated":"2016-02-17 18:00:31.000000000","message":"This has always been a feature of this class. The upstream library changed in a way that broke it.","commit_id":"7f098afd2da15ea007ee707086419d71117028fa"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"4a2ad64c230a3a55fa28eba1e9d76620e49c2d01","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        # low for comparing most dicts"},{"line_number":86,"context_line":"        self.maxDiff \u003d 10000"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def addCleanup(self, function, *args, **kwargs):"},{"line_number":89,"context_line":"        # NOTE(dims): This is a hack for Mitaka. We\u0027ll need to undo this as"},{"line_number":90,"context_line":"        # early as possible in Newton and advertise that this hack will not"},{"line_number":91,"context_line":"        # be supported anymore."}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_b9836e55","line":88,"updated":"2016-02-17 16:19:46.000000000","message":"Add a comment what the goal is of overriding addCleanup. Move the comment at line 95 up here.\n\nHow is this going to work if the application never calls addCleanup?\n\nHow about provide the application a switch (e.g. a global variable) to disable this? We should be able to disable this in keystone and fix our tests to clean up after themselves if they\u0027re not already (I think they\u0027re cleaning up after themselves already).","commit_id":"7f098afd2da15ea007ee707086419d71117028fa"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"6d54ffb64d8141c7cb74ebe81583e847efbac97d","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        # low for comparing most dicts"},{"line_number":86,"context_line":"        self.maxDiff \u003d 10000"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def addCleanup(self, function, *args, **kwargs):"},{"line_number":89,"context_line":"        # NOTE(dims): This is a hack for Mitaka. We\u0027ll need to undo this as"},{"line_number":90,"context_line":"        # early as possible in Newton and advertise that this hack will not"},{"line_number":91,"context_line":"        # be supported anymore."}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_3b274ecb","line":88,"in_reply_to":"dae33548_3be90ee7","updated":"2016-02-17 18:00:31.000000000","message":"Holy Side-effects, Batman!\n\nOK, it\u0027s still ugly, but until we can sort out a better solution upstream or deprecate this class (my preference) I think it\u0027ll do.","commit_id":"7f098afd2da15ea007ee707086419d71117028fa"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"ab6fe54551801244ad7369420c292aa59ec96f1c","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        # low for comparing most dicts"},{"line_number":86,"context_line":"        self.maxDiff \u003d 10000"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def addCleanup(self, function, *args, **kwargs):"},{"line_number":89,"context_line":"        # NOTE(dims): This is a hack for Mitaka. We\u0027ll need to undo this as"},{"line_number":90,"context_line":"        # early as possible in Newton and advertise that this hack will not"},{"line_number":91,"context_line":"        # be supported anymore."}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_3be90ee7","line":88,"in_reply_to":"dae33548_8a7f26aa","updated":"2016-02-17 17:48:54.000000000","message":"Doug,\n\nHere\u0027s the quirk i forgot to mention... even if folks who subclass this class do not call addCleanup(), that method is called when the useFixture() in the setUp method in this class is called. \n\nSo this piece of code still kicks in.\n\n-- Dims","commit_id":"7f098afd2da15ea007ee707086419d71117028fa"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"1f9ebdbb94a342f3606295e682cf24c62cf3012a","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        # low for comparing most dicts"},{"line_number":86,"context_line":"        self.maxDiff \u003d 10000"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def addCleanup(self, function, *args, **kwargs):"},{"line_number":89,"context_line":"        # NOTE(dims): This is a hack for Mitaka. We\u0027ll need to undo this as"},{"line_number":90,"context_line":"        # early as possible in Newton and advertise that this hack will not"},{"line_number":91,"context_line":"        # be supported anymore."}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_5e9ddf08","line":88,"in_reply_to":"dae33548_8a7f26aa","updated":"2016-02-17 18:34:52.000000000","message":"it might be that addCleanup is called by this class when it\u0027s creating fixtures.","commit_id":"7f098afd2da15ea007ee707086419d71117028fa"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"543dde5ef142eb5ca390a59119cae653f68529b5","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        # low for comparing most dicts"},{"line_number":86,"context_line":"        self.maxDiff \u003d 10000"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def addCleanup(self, function, *args, **kwargs):"},{"line_number":89,"context_line":"        # NOTE(dims): This is a hack for Mitaka. We\u0027ll need to undo this as"},{"line_number":90,"context_line":"        # early as possible in Newton and advertise that this hack will not"},{"line_number":91,"context_line":"        # be supported anymore."}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_8a7f26aa","line":88,"in_reply_to":"dae33548_b9836e55","updated":"2016-02-17 17:03:32.000000000","message":"I think projects that don\u0027t want this behavior should not use the class. This is one of the last remaining unique aspects to this class. Most everything else is in its own fixtures.\n\nYou do raise a good point about it not working if nothing calls addCleanup(). I don\u0027t have a good solution there. Is the reset method part of the public API? Maybe we can override that instead of addCleanup.","commit_id":"7f098afd2da15ea007ee707086419d71117028fa"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"4a2ad64c230a3a55fa28eba1e9d76620e49c2d01","unresolved":false,"context_lines":[{"line_number":100,"context_line":"                super(BaseTestCase, self).addCleanup(mock.patch.stopall)"},{"line_number":101,"context_line":"        else:"},{"line_number":102,"context_line":"            LOG.error(\u0027Unable to patch test case. \u0027"},{"line_number":103,"context_line":"                      \u0027mock.patch.stopall cleanup was not registered.\u0027)"},{"line_number":104,"context_line":"        super(BaseTestCase, self).addCleanup(function, *args, **kwargs)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_1971ba76","line":103,"updated":"2016-02-17 16:19:46.000000000","message":"If I see this in the log, what am I supposed to do about it? Add some info to the log message.","commit_id":"7f098afd2da15ea007ee707086419d71117028fa"}]}
