)]}'
{"ceilometermiddleware/tests/test_swift.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"87a45348850b4d1b51eaed7a3ac9519d0cef2af2","unresolved":false,"context_lines":[{"line_number":329,"context_line":"            data \u003d notify.call_args_list[0][0]"},{"line_number":330,"context_line":"            self.assertEqual(\"account\", data[2][\u0027target\u0027][\u0027id\u0027])"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def test_empty_reseller_prefix(self):"},{"line_number":333,"context_line":"        app \u003d swift.Swift("},{"line_number":334,"context_line":"            FakeApp(), {\u0027reseller_prefix\u0027: \u0027CUSTOM\u0027})"},{"line_number":335,"context_line":"        req \u003d FakeRequest(\u0027/1.0/CUSTOM/container/obj\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_dc3489fc","line":332,"updated":"2015-06-22 21:45:29.000000000","message":"this seems to be testing no account?","commit_id":"19bb0cfaeefd75ec882797341c160a0a38d11fa6"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"1f6df847bdc86f47f96b418390a59e9d2c721702","unresolved":false,"context_lines":[{"line_number":329,"context_line":"            data \u003d notify.call_args_list[0][0]"},{"line_number":330,"context_line":"            self.assertEqual(\"account\", data[2][\u0027target\u0027][\u0027id\u0027])"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def test_empty_reseller_prefix(self):"},{"line_number":333,"context_line":"        app \u003d swift.Swift("},{"line_number":334,"context_line":"            FakeApp(), {\u0027reseller_prefix\u0027: \u0027CUSTOM\u0027})"},{"line_number":335,"context_line":"        req \u003d FakeRequest(\u0027/1.0/CUSTOM/container/obj\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_4409702b","line":332,"in_reply_to":"fa32b979_dc3489fc","updated":"2015-06-23 07:00:01.000000000","message":"Yep. The test was written while I was trying to find out how it is possible to receive a notification from middleware with empty payload[target][id]. When there is no account in the following line https://github.com/openstack/ceilometermiddleware/blob/master/ceilometermiddleware/swift.py#L201 id is \u0027\u0027. But during resource construction (inside line 199) we have\n\n    setattr(self, RESOURCE_KEYNAME_ID, id or identifier.generate_uuid())\n\nSo after all we have resource.id\u003dsome_uuid and Ceilometer will not receive notification with empty resource from middleware. This test is just a verification of this behavior.","commit_id":"19bb0cfaeefd75ec882797341c160a0a38d11fa6"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"87a45348850b4d1b51eaed7a3ac9519d0cef2af2","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        with mock.patch(\u0027oslo.messaging.Notifier.info\u0027) as notify:"},{"line_number":338,"context_line":"            list(app(req.environ, self.start_response))"},{"line_number":339,"context_line":"            data \u003d notify.call_args_list[0][0]"},{"line_number":340,"context_line":"        self.assertIsNot(0, len(data[2][\u0027target\u0027][\u0027id\u0027]))"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_7cb69d8b","line":340,"updated":"2015-06-22 21:45:29.000000000","message":"why do we test this outside the context?","commit_id":"19bb0cfaeefd75ec882797341c160a0a38d11fa6"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"1f6df847bdc86f47f96b418390a59e9d2c721702","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        with mock.patch(\u0027oslo.messaging.Notifier.info\u0027) as notify:"},{"line_number":338,"context_line":"            list(app(req.environ, self.start_response))"},{"line_number":339,"context_line":"            data \u003d notify.call_args_list[0][0]"},{"line_number":340,"context_line":"        self.assertIsNot(0, len(data[2][\u0027target\u0027][\u0027id\u0027]))"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_a4771c9e","line":340,"in_reply_to":"fa32b979_7cb69d8b","updated":"2015-06-23 07:00:01.000000000","message":"will fix","commit_id":"19bb0cfaeefd75ec882797341c160a0a38d11fa6"}]}
