)]}'
{"tests/unit/plugins/openstack/context/cleanup/test_resources.py":[{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"b08de7551528b38488b82b87eea4beb3f16c105f","unresolved":false,"context_lines":[{"line_number":276,"context_line":"    def get_neutron_lbaasv1_mixin(self):"},{"line_number":277,"context_line":"        neut \u003d resources.NeutronLbaasV1Mixin()"},{"line_number":278,"context_line":"        neut._service \u003d \"neutron\""},{"line_number":279,"context_line":"        return neut"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    @mock.patch(\"%s.NeutronLbaasV1Mixin._manager\" % BASE)"},{"line_number":282,"context_line":"    def test_list_lbaas_available(self, mock__manager):"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_06f00966","line":279,"updated":"2015-08-31 11:47:17.000000000","message":"You can also mock `_manager\u0027 here","commit_id":"4d36891d7fc40ca22b6c4a3e97e0ff16dd4e9c2a"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"b08de7551528b38488b82b87eea4beb3f16c105f","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        neut._service \u003d \"neutron\""},{"line_number":279,"context_line":"        return neut"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    @mock.patch(\"%s.NeutronLbaasV1Mixin._manager\" % BASE)"},{"line_number":282,"context_line":"    def test_list_lbaas_available(self, mock__manager):"},{"line_number":283,"context_line":"        mock__manager().list_extensions.return_value \u003d {"},{"line_number":284,"context_line":"            \"extensions\": [{\"alias\": \"lbaas\"}]"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_26ce6d2e","line":281,"updated":"2015-08-31 11:47:17.000000000","message":"This decorator looks redundant since you already have NeutronLbaasV1Mixin instance at get_neutron_lbaasv1_mixin(), so you can mock _manager simply by this (see my comment above):\n\n neut._manager \u003d mock.Mock(...)","commit_id":"4d36891d7fc40ca22b6c4a3e97e0ff16dd4e9c2a"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"b08de7551528b38488b82b87eea4beb3f16c105f","unresolved":false,"context_lines":[{"line_number":284,"context_line":"            \"extensions\": [{\"alias\": \"lbaas\"}]"},{"line_number":285,"context_line":"        }"},{"line_number":286,"context_line":"        neut \u003d self.get_neutron_lbaasv1_mixin()"},{"line_number":287,"context_line":"        neut._resource \u003d \"some_resource\""},{"line_number":288,"context_line":"        neut.tenant_uuid \u003d \"user_tenant\""},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"        some_resources \u003d [{\"tenant_id\": neut.tenant_uuid}, {\"tenant_id\": \"a\"}]"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_6150cfd4","line":287,"updated":"2015-08-31 11:47:17.000000000","message":"This also can be set in  get_neutron_lbaasv1_mixin(), to save LOC","commit_id":"4d36891d7fc40ca22b6c4a3e97e0ff16dd4e9c2a"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"b08de7551528b38488b82b87eea4beb3f16c105f","unresolved":false,"context_lines":[{"line_number":292,"context_line":"            \"some_resources\": some_resources"},{"line_number":293,"context_line":"        }"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"        self.assertEqual([some_resources[0]], list(neut.list()))"},{"line_number":296,"context_line":"        mock__manager().list_some_resources.assert_called_once_with("},{"line_number":297,"context_line":"            {\"tenant_id\": neut.tenant_uuid})"},{"line_number":298,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_868bb9c2","line":295,"updated":"2015-08-31 11:47:17.000000000","message":"I guess that we can simplify: s/list(neut.list())/neut.list()/","commit_id":"4d36891d7fc40ca22b6c4a3e97e0ff16dd4e9c2a"},{"author":{"_account_id":16958,"name":"Jean-Philippe Braun","email":"jean-philippe.braun@cloudwatt.com","username":"eon"},"change_message_id":"a171be379807773b63118be51ef84e9ee4c763dc","unresolved":false,"context_lines":[{"line_number":292,"context_line":"            \"some_resources\": some_resources"},{"line_number":293,"context_line":"        }"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"        self.assertEqual([some_resources[0]], list(neut.list()))"},{"line_number":296,"context_line":"        mock__manager().list_some_resources.assert_called_once_with("},{"line_number":297,"context_line":"            {\"tenant_id\": neut.tenant_uuid})"},{"line_number":298,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_3380e3f4","line":295,"in_reply_to":"da20952f_868bb9c2","updated":"2015-08-31 15:34:24.000000000","message":"Seems it\u0027s necessary for python3.4 as neut.list returns a filter object","commit_id":"4d36891d7fc40ca22b6c4a3e97e0ff16dd4e9c2a"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"b08de7551528b38488b82b87eea4beb3f16c105f","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        mock__manager().list_some_resources.assert_called_once_with("},{"line_number":297,"context_line":"            {\"tenant_id\": neut.tenant_uuid})"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    @mock.patch(\"%s.NeutronLbaasV1Mixin._manager\" % BASE)"},{"line_number":300,"context_line":"    def test_list_lbaas_unavailable(self, mock__manager):"},{"line_number":301,"context_line":"        mock__manager().list_extensions.return_value \u003d {"},{"line_number":302,"context_line":"            \"extensions\": []"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_a6011d3a","line":299,"updated":"2015-08-31 11:47:17.000000000","message":"same here","commit_id":"4d36891d7fc40ca22b6c4a3e97e0ff16dd4e9c2a"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"b08de7551528b38488b82b87eea4beb3f16c105f","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        neut \u003d self.get_neutron_lbaasv1_mixin()"},{"line_number":305,"context_line":"        neut._resource \u003d \"some_resource\""},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        self.assertEqual([], list(neut.list()))"},{"line_number":308,"context_line":"        self.assertFalse(mock__manager().list_some_resources.called)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_86a5f9a2","line":307,"updated":"2015-08-31 11:47:17.000000000","message":"I guess that we can simplify: s/list(neut.list())/neut.list()/","commit_id":"4d36891d7fc40ca22b6c4a3e97e0ff16dd4e9c2a"}]}
