)]}'
{"shade/_tasks.py":[{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"7714f40a3b153c8b588888b15c4d0f070eb42502","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        return client.nova_client.keypairs.delete(**self.args)"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"class NetworkList(task_manager.Task):"},{"line_number":211,"context_line":"    def main(self, client):"},{"line_number":212,"context_line":"        return client.neutron_client.list_networks(**self.args)"},{"line_number":213,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7ffa3b31_558cced5","side":"PARENT","line":210,"updated":"2017-04-21 11:25:31.000000000","message":"Save this for the next patch.","commit_id":"d5f5c70b9052e4948aae772642e032f401fd0858"}],"shade/openstackcloud.py":[{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"7714f40a3b153c8b588888b15c4d0f070eb42502","unresolved":false,"context_lines":[{"line_number":1640,"context_line":"        # Translate None from search interface to empty {} for kwargs below"},{"line_number":1641,"context_line":"        if not filters:"},{"line_number":1642,"context_line":"            filters \u003d {}"},{"line_number":1643,"context_line":"        return self._network_client.get(\"/networks.json\", params\u003dfilters)"},{"line_number":1644,"context_line":""},{"line_number":1645,"context_line":"    def list_routers(self, filters\u003dNone):"},{"line_number":1646,"context_line":"        \"\"\"List all available routers."}],"source_content_type":"text/x-python","patch_set":1,"id":"7ffa3b31_75910af1","line":1643,"updated":"2017-04-21 11:25:31.000000000","message":"Save this for the next patch.","commit_id":"c3c55c7a7fb612d40c371814ce0ee3e54a207969"}],"shade/tests/unit/test_caching.py":[{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"7714f40a3b153c8b588888b15c4d0f070eb42502","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        self.cloud._SERVER_AGE \u003d 2"},{"line_number":185,"context_line":"        fake_server \u003d fakes.FakeServer(\u00271234\u0027, \u0027\u0027, \u0027ACTIVE\u0027)"},{"line_number":186,"context_line":"        nova_mock.servers.list.return_value \u003d [fake_server]"},{"line_number":187,"context_line":"        self.register_uris(["},{"line_number":188,"context_line":"            dict(method\u003d\u0027GET\u0027,"},{"line_number":189,"context_line":"                 uri\u003dself.get_mock_url("},{"line_number":190,"context_line":"                     \u0027network\u0027, \u0027public\u0027, append\u003d[\u0027v2.0\u0027, \u0027networks.json\u0027]),"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ffa3b31_9586d6b8","line":187,"updated":"2017-04-21 11:25:31.000000000","message":"We weren\u0027t mocking neutron_client here- is these needed?","commit_id":"c3c55c7a7fb612d40c371814ce0ee3e54a207969"}],"shade/tests/unit/test_create_server.py":[{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"7714f40a3b153c8b588888b15c4d0f070eb42502","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        \"\"\""},{"line_number":33,"context_line":"        Test that an exception in the novaclient create raises an exception in"},{"line_number":34,"context_line":"        create_server."},{"line_number":35,"context_line":"        \"\"\""},{"line_number":36,"context_line":"        self.register_uris(["},{"line_number":37,"context_line":"            dict(method\u003d\u0027GET\u0027,"},{"line_number":38,"context_line":"                 uri\u003dself.get_mock_url("}],"source_content_type":"text/x-python","patch_set":1,"id":"7ffa3b31_3598221a","line":35,"updated":"2017-04-21 11:25:31.000000000","message":"We weren\u0027t mocking neutron_client for any of the tests in this file- are these needed?","commit_id":"c3c55c7a7fb612d40c371814ce0ee3e54a207969"}],"shade/tests/unit/test_network.py":[{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"7714f40a3b153c8b588888b15c4d0f070eb42502","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from shade.tests.unit import base"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class TestNetwork(base.RequestsMockTestCase):"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    @mock.patch.object(shade.OpenStackCloud, \u0027neutron_client\u0027)"},{"line_number":23,"context_line":"    def test_create_network(self, mock_neutron):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ffa3b31_55f72e5a","line":20,"updated":"2017-04-21 11:25:31.000000000","message":"This is fine - although it seems like it crept in to this patch (no list calls in this file)","commit_id":"c3c55c7a7fb612d40c371814ce0ee3e54a207969"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"1bf78118fc918ce40988dc6694749a92a98e64b0","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from shade.tests.unit import base"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class TestNetwork(base.RequestsMockTestCase):"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    @mock.patch.object(shade.OpenStackCloud, \u0027neutron_client\u0027)"},{"line_number":23,"context_line":"    def test_create_network(self, mock_neutron):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5ff73747_fdcf0755","line":20,"in_reply_to":"5ff73747_bd497f61","updated":"2017-04-21 20:44:45.000000000","message":"YES - I think that\u0027s an excellent idea.","commit_id":"c3c55c7a7fb612d40c371814ce0ee3e54a207969"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"ad456ccc4a31868ca0f9a936f90c3fe15b505f0a","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from shade.tests.unit import base"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class TestNetwork(base.RequestsMockTestCase):"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    @mock.patch.object(shade.OpenStackCloud, \u0027neutron_client\u0027)"},{"line_number":23,"context_line":"    def test_create_network(self, mock_neutron):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5ff73747_9d4b63af","line":20,"in_reply_to":"5ff73747_fdcf0755","updated":"2017-04-21 20:55:47.000000000","message":"ok, so maybe I will first move those tests here and then will start to replace neutron client mock with RequestsMockTestCase. Will it works for You?","commit_id":"c3c55c7a7fb612d40c371814ce0ee3e54a207969"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"021d796f3eb5a7ee475d1e4c80fb6208cea9758f","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from shade.tests.unit import base"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class TestNetwork(base.RequestsMockTestCase):"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    @mock.patch.object(shade.OpenStackCloud, \u0027neutron_client\u0027)"},{"line_number":23,"context_line":"    def test_create_network(self, mock_neutron):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5ff73747_bd497f61","line":20,"in_reply_to":"7ffa3b31_55f72e5a","updated":"2017-04-21 20:33:08.000000000","message":"I though that I should add tests related to network list here, but now I removed this change.\nMaybe in separate patch we can move all tests related to networks (list/delete) to this file. What You think about it?","commit_id":"c3c55c7a7fb612d40c371814ce0ee3e54a207969"}],"shade/tests/unit/test_rebuild_server.py":[{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"7714f40a3b153c8b588888b15c4d0f070eb42502","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                 uri\u003dself.get_mock_url("},{"line_number":42,"context_line":"                     \u0027network\u0027, \u0027public\u0027, append\u003d[\u0027v2.0\u0027, \u0027networks.json\u0027]),"},{"line_number":43,"context_line":"                 json\u003d{\u0027networks\u0027: []})"},{"line_number":44,"context_line":"        ])"},{"line_number":45,"context_line":"        mock_nova.servers.rebuild.side_effect \u003d Exception(\"exception\")"},{"line_number":46,"context_line":"        self.assertRaises("},{"line_number":47,"context_line":"            exc.OpenStackCloudException, self.cloud.rebuild_server, \"a\", \"b\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ffa3b31_d5a0de44","line":44,"updated":"2017-04-21 11:25:31.000000000","message":"We weren\u0027t mocking neutron_client for any of the tests in this file- are these needed?","commit_id":"c3c55c7a7fb612d40c371814ce0ee3e54a207969"}],"shade/tests/unit/test_shade.py":[{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"7714f40a3b153c8b588888b15c4d0f070eb42502","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        self.assertRaises(exc.OpenStackCloudException,"},{"line_number":79,"context_line":"                          self.cloud.list_servers)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    @mock.patch.object(shade.OpenStackCloud, \u0027neutron_client\u0027)"},{"line_number":82,"context_line":"    def test_list_networks(self, mock_neutron):"},{"line_number":83,"context_line":"        net1 \u003d {\u0027id\u0027: \u00271\u0027, \u0027name\u0027: \u0027net1\u0027}"},{"line_number":84,"context_line":"        net2 \u003d {\u0027id\u0027: \u00272\u0027, \u0027name\u0027: \u0027net2\u0027}"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ffa3b31_95d816ef","side":"PARENT","line":81,"updated":"2017-04-21 11:25:31.000000000","message":"We should definitely not remove these, but instead should replace their mocking of neutron_client with self.register_uris. You should be able to set json\u003d to the exact same dict that we\u0027re assigning to return_value there. And add self.assert_calls() at the end.","commit_id":"d5f5c70b9052e4948aae772642e032f401fd0858"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"7714f40a3b153c8b588888b15c4d0f070eb42502","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        self.assertEqual([net1, net2], nets)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    @mock.patch.object(shade.OpenStackCloud, \u0027neutron_client\u0027)"},{"line_number":93,"context_line":"    def test_list_networks_filtered(self, mock_neutron):"},{"line_number":94,"context_line":"        self.cloud.list_networks(filters\u003d{\u0027name\u0027: \u0027test\u0027})"},{"line_number":95,"context_line":"        mock_neutron.list_networks.assert_called_once_with(name\u003d\u0027test\u0027)"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7ffa3b31_b5dd52e1","side":"PARENT","line":93,"updated":"2017-04-21 11:25:31.000000000","message":"Same here, you\u0027ll want to add a GET call (make sure to add qs_elements\u003d[\u0027name\u003dfoobar\u0027] to the get_mock_url call) and remove the mock of neutron_client. And add self.assert_calls() at the end.","commit_id":"d5f5c70b9052e4948aae772642e032f401fd0858"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"7714f40a3b153c8b588888b15c4d0f070eb42502","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        self.cloud.list_networks(filters\u003d{\u0027name\u0027: \u0027test\u0027})"},{"line_number":95,"context_line":"        mock_neutron.list_networks.assert_called_once_with(name\u003d\u0027test\u0027)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    @mock.patch.object(shade.OpenStackCloud, \u0027neutron_client\u0027)"},{"line_number":98,"context_line":"    def test_list_networks_exception(self, mock_neutron):"},{"line_number":99,"context_line":"        mock_neutron.list_networks.side_effect \u003d Exception()"},{"line_number":100,"context_line":"        with testtools.ExpectedException("}],"source_content_type":"text/x-python","patch_set":1,"id":"7ffa3b31_15f64664","side":"PARENT","line":97,"updated":"2017-04-21 11:25:31.000000000","message":"This is a duplicate of the ones below, so you can remove it.","commit_id":"d5f5c70b9052e4948aae772642e032f401fd0858"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"7714f40a3b153c8b588888b15c4d0f070eb42502","unresolved":false,"context_lines":[{"line_number":503,"context_line":"                          self.cloud.update_subnet,"},{"line_number":504,"context_line":"                          \u0027456\u0027, gateway_ip\u003dgateway, disable_gateway_ip\u003dTrue)"},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"    def test__neutron_exceptions_resource_not_found(self):"},{"line_number":507,"context_line":"        with mock.patch.object("},{"line_number":508,"context_line":"                shade._tasks, \u0027NetworkList\u0027,"},{"line_number":509,"context_line":"                side_effect\u003dn_exc.NotFound()):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ffa3b31_35e022cd","side":"PARENT","line":506,"updated":"2017-04-21 11:25:31.000000000","message":"So, for these, instead of removing them, put in the GET call but instead of json\u003d have it have status_code\u003d404.\n\nhttps://developer.openstack.org/api-ref/networking/v2/?expanded\u003dshow-network-details-detail","commit_id":"d5f5c70b9052e4948aae772642e032f401fd0858"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"7714f40a3b153c8b588888b15c4d0f070eb42502","unresolved":false,"context_lines":[{"line_number":510,"context_line":"            self.assertRaises(exc.OpenStackCloudResourceNotFound,"},{"line_number":511,"context_line":"                              self.cloud.list_networks)"},{"line_number":512,"context_line":""},{"line_number":513,"context_line":"    def test__neutron_exceptions_url_not_found(self):"},{"line_number":514,"context_line":"        with mock.patch.object("},{"line_number":515,"context_line":"                shade._tasks, \u0027NetworkList\u0027,"},{"line_number":516,"context_line":"                side_effect\u003dn_exc.NeutronClientException(status_code\u003d404)):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ffa3b31_f5e51add","side":"PARENT","line":513,"updated":"2017-04-21 11:25:31.000000000","message":"Do the same for this one - which may sound silly, but these two shade exceptions are the same for backwards compat so the test is here to make sure we don\u0027t regress.","commit_id":"d5f5c70b9052e4948aae772642e032f401fd0858"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"7714f40a3b153c8b588888b15c4d0f070eb42502","unresolved":false,"context_lines":[{"line_number":517,"context_line":"            self.assertRaises(exc.OpenStackCloudURINotFound,"},{"line_number":518,"context_line":"                              self.cloud.list_networks)"},{"line_number":519,"context_line":""},{"line_number":520,"context_line":"    def test__neutron_exceptions_neutron_client_generic(self):"},{"line_number":521,"context_line":"        with mock.patch.object("},{"line_number":522,"context_line":"                shade._tasks, \u0027NetworkList\u0027,"},{"line_number":523,"context_line":"                side_effect\u003dn_exc.NeutronClientException()):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ffa3b31_1531a65a","side":"PARENT","line":520,"updated":"2017-04-21 11:25:31.000000000","message":"This one and the next can go.","commit_id":"d5f5c70b9052e4948aae772642e032f401fd0858"}]}
