)]}'
{"tackerclient/tests/unit/test_cli10.py":[{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"9a20b21c1194e1d61bd9a65a2d18b743f8b530c2","unresolved":false,"context_lines":[{"line_number":355,"context_line":"                \u0027GET\u0027,"},{"line_number":356,"context_line":"                body\u003dNone,"},{"line_number":357,"context_line":"                headers\u003d{\u0027X-Auth-Token\u0027: TOKEN})"},{"line_number":358,"context_line":"            with mock.patch.object(TackerCommand, \u0027get_client\u0027) as mock_get:"},{"line_number":359,"context_line":"                mock_get.return_value \u003d self.client"},{"line_number":360,"context_line":"                cmd_parser \u003d cmd.get_parser(\"list_\" + resources)"},{"line_number":361,"context_line":"                shell.run_command(cmd, cmd_parser, args)"}],"source_content_type":"text/x-python","patch_set":2,"id":"dab17558_2d7d9be7","line":358,"range":{"start_line":358,"start_character":12,"end_line":358,"end_character":75},"updated":"2016-05-09 22:41:45.000000000","message":"Usually I\u0027ll try and make this a decorator but when I don\u0027t it\u0027s because the mock object doesn\u0027t get passed in to the function correctly. What I mean by \u0027the mock object doesn\u0027t get passed...\u0027I\u0027ve gotten errors saying, \"type \u0027bool\u0027 doesn\u0027t have attribute return_value\" as well as \"type \u0027list\u0027 doesn\u0027t have attribute return_value\".","commit_id":"ca572fdd0272184f736f715f7b8b3f40be774989"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"9a20b21c1194e1d61bd9a65a2d18b743f8b530c2","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        resstr1 \u003d self.client.serialize(reses1)"},{"line_number":380,"context_line":"        resstr2 \u003d self.client.serialize(reses2)"},{"line_number":381,"context_line":"        with mock.patch.object(self.client.httpclient, \u0027request\u0027) as mock_req:"},{"line_number":382,"context_line":"            mock_req.return_value \u003d (MyResp(200), resstr1)"},{"line_number":383,"context_line":"            self.client.httpclient.request("},{"line_number":384,"context_line":"                end_url(path, \"\", format\u003dself.format), \u0027GET\u0027,"},{"line_number":385,"context_line":"                body\u003dNone,"}],"source_content_type":"text/x-python","patch_set":2,"id":"dab17558_edeef3b2","line":382,"range":{"start_line":382,"start_character":50,"end_line":382,"end_character":57},"updated":"2016-05-09 22:41:45.000000000","message":"One thing I noticed was when I change this to resstr2, the test still passes. That doesn\u0027t seem right.","commit_id":"ca572fdd0272184f736f715f7b8b3f40be774989"},{"author":{"_account_id":13485,"name":"Sripriya Seetharam","email":"sseetha@brocade.com","username":"Sripriya"},"change_message_id":"366066f8e99a40bc16c90df44d80fadde5697a67","unresolved":false,"context_lines":[{"line_number":245,"context_line":"        self.mox.ReplayAll()"},{"line_number":246,"context_line":"        cmd_parser \u003d cmd.get_parser(\u0027create_\u0027 + resource)"},{"line_number":247,"context_line":"        shell.run_command(cmd, cmd_parser, args)"},{"line_number":248,"context_line":"        self.mox.VerifyAll()"},{"line_number":249,"context_line":"        self.mox.UnsetStubs()"},{"line_number":250,"context_line":"        _str \u003d self.fake_stdout.make_string()"},{"line_number":251,"context_line":"        self.assertIn(myid, _str)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bab6814e_8a5ca6ee","side":"PARENT","line":248,"range":{"start_line":248,"start_character":17,"end_line":248,"end_character":28},"updated":"2016-05-24 19:30:07.000000000","message":"we will have to the equivalent with mock objects and assert that they are called with the required parameters. \n\nthis is applicable for the entire file where mox.VerifyAll is called","commit_id":"cce904b24b60ee31523bfd333898be434bcd2f8e"},{"author":{"_account_id":13485,"name":"Sripriya Seetharam","email":"sseetha@brocade.com","username":"Sripriya"},"change_message_id":"366066f8e99a40bc16c90df44d80fadde5697a67","unresolved":false,"context_lines":[{"line_number":200,"context_line":"            self._get_attr_metadata))"},{"line_number":201,"context_line":"        self.client \u003d client.Client(token\u003dTOKEN, endpoint_url\u003dself.endurl)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    @mock.patch.object(TackerCommand, \u0027get_client\u0027)"},{"line_number":204,"context_line":"    def _test_create_resource(self, resource, cmd,"},{"line_number":205,"context_line":"                              name, myid, args,"},{"line_number":206,"context_line":"                              position_names, position_values, mock_get,"}],"source_content_type":"text/x-python","patch_set":4,"id":"bab6814e_ca64eee6","line":203,"range":{"start_line":203,"start_character":4,"end_line":203,"end_character":51},"updated":"2016-05-24 19:30:07.000000000","message":"you can move this to setup method since get_client needs to be mocked for all test cases. this voids the get_client decorator in each of below test cases. \n\napplicable for all test cases in this file","commit_id":"dc839db9ecd5e458b7d0a05e6c0ec82bea2bb5a2"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"daa1e56d58515e4f8a8e05588324077d5af56eca","unresolved":false,"context_lines":[{"line_number":200,"context_line":"            self._get_attr_metadata))"},{"line_number":201,"context_line":"        self.client \u003d client.Client(token\u003dTOKEN, endpoint_url\u003dself.endurl)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    @mock.patch.object(TackerCommand, \u0027get_client\u0027)"},{"line_number":204,"context_line":"    def _test_create_resource(self, resource, cmd,"},{"line_number":205,"context_line":"                              name, myid, args,"},{"line_number":206,"context_line":"                              position_names, position_values, mock_get,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9abb7d3a_dc941038","line":203,"range":{"start_line":203,"start_character":4,"end_line":203,"end_character":51},"in_reply_to":"9abb7d3a_e70ee18a","updated":"2016-06-01 19:40:48.000000000","message":"I don\u0027t think this will work either. See the paste for what I\u0027ve tried with their results, http://paste.openstack.org/show/507022/ \n\nAnother thought, if what you\u0027re saying is possible, then why didn\u0027t the previous implementation use StubOutWithMock in the setUp function?","commit_id":"dc839db9ecd5e458b7d0a05e6c0ec82bea2bb5a2"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"e6400fb3988d77be4b50f5c0de00d7afbf67b7ec","unresolved":false,"context_lines":[{"line_number":200,"context_line":"            self._get_attr_metadata))"},{"line_number":201,"context_line":"        self.client \u003d client.Client(token\u003dTOKEN, endpoint_url\u003dself.endurl)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    @mock.patch.object(TackerCommand, \u0027get_client\u0027)"},{"line_number":204,"context_line":"    def _test_create_resource(self, resource, cmd,"},{"line_number":205,"context_line":"                              name, myid, args,"},{"line_number":206,"context_line":"                              position_names, position_values, mock_get,"}],"source_content_type":"text/x-python","patch_set":4,"id":"bab6814e_ce4cff9f","line":203,"range":{"start_line":203,"start_character":4,"end_line":203,"end_character":51},"in_reply_to":"bab6814e_ca64eee6","updated":"2016-05-24 20:58:04.000000000","message":"I\u0027m trying this out now and it doesn\u0027t seem to work. To be clear, this is what I have for the setUp method: http://paste.openstack.org/show/498745/ I will be updating my patch set without this suggestion for now.","commit_id":"dc839db9ecd5e458b7d0a05e6c0ec82bea2bb5a2"},{"author":{"_account_id":13485,"name":"Sripriya Seetharam","email":"sseetha@brocade.com","username":"Sripriya"},"change_message_id":"ba3bb9db50b0fb4ccf3c6610cd18bb20bae2d034","unresolved":false,"context_lines":[{"line_number":200,"context_line":"            self._get_attr_metadata))"},{"line_number":201,"context_line":"        self.client \u003d client.Client(token\u003dTOKEN, endpoint_url\u003dself.endurl)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    @mock.patch.object(TackerCommand, \u0027get_client\u0027)"},{"line_number":204,"context_line":"    def _test_create_resource(self, resource, cmd,"},{"line_number":205,"context_line":"                              name, myid, args,"},{"line_number":206,"context_line":"                              position_names, position_values, mock_get,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9abb7d3a_e70ee18a","line":203,"range":{"start_line":203,"start_character":4,"end_line":203,"end_character":51},"in_reply_to":"bab6814e_ce4cff9f","updated":"2016-05-31 19:59:58.000000000","message":"could we just directly mock the get_client object inside setup instead of decorating the setUp method. What happens with your implementation is that mock context is only applied for the setup method and later forgotten when the actual test case is run. Hence it may not be working.","commit_id":"dc839db9ecd5e458b7d0a05e6c0ec82bea2bb5a2"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"0799f7900302a1c29862642ce093f5bed4d68bf2","unresolved":false,"context_lines":[{"line_number":200,"context_line":"            self._get_attr_metadata))"},{"line_number":201,"context_line":"        self.client \u003d client.Client(token\u003dTOKEN, endpoint_url\u003dself.endurl)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    @mock.patch.object(TackerCommand, \u0027get_client\u0027)"},{"line_number":204,"context_line":"    def _test_create_resource(self, resource, cmd,"},{"line_number":205,"context_line":"                              name, myid, args,"},{"line_number":206,"context_line":"                              position_names, position_values, mock_get,"}],"source_content_type":"text/x-python","patch_set":5,"id":"bab6814e_55a4efb7","line":203,"range":{"start_line":203,"start_character":4,"end_line":203,"end_character":51},"updated":"2016-05-25 14:16:46.000000000","message":"Moving this to the setUp function resulted in the get_client function to be not be mocked across all functions. See http://paste.openstack.org/show/498745/ for the implementation I tried in setUp.","commit_id":"b711263080b7363fe09fab15a57edeca658e6c28"},{"author":{"_account_id":13485,"name":"Sripriya Seetharam","email":"sseetha@brocade.com","username":"Sripriya"},"change_message_id":"4c67d4adf4022e1af7b7f6122237b4b249877bf9","unresolved":false,"context_lines":[{"line_number":477,"context_line":"            self.assertIn(\u0027myid1\u0027, _str)"},{"line_number":478,"context_line":"        return _str"},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"    def _test_list_sub_resources_with_pagination(self, resources, api_resource,"},{"line_number":481,"context_line":"                                                 cmd, myid):"},{"line_number":482,"context_line":"        self.mox.StubOutWithMock(cmd, \"get_client\")"},{"line_number":483,"context_line":"        self.mox.StubOutWithMock(self.client.httpclient, \"request\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_effb4579","side":"PARENT","line":480,"range":{"start_line":480,"start_character":8,"end_line":480,"end_character":48},"updated":"2016-10-13 21:00:54.000000000","message":"i know we do not support pagination yet on tacker resources. but i think it is good to retain the pagination test cases on base resource, it is easier to then extend these tests for tacker specific resources","commit_id":"98a6ea328a3f9d9c1a9eeb66a30dcdfa99cec9ad"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"c36cdd95be9d5335ae5b6dac794623f42482c733","unresolved":false,"context_lines":[{"line_number":477,"context_line":"            self.assertIn(\u0027myid1\u0027, _str)"},{"line_number":478,"context_line":"        return _str"},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"    def _test_list_sub_resources_with_pagination(self, resources, api_resource,"},{"line_number":481,"context_line":"                                                 cmd, myid):"},{"line_number":482,"context_line":"        self.mox.StubOutWithMock(cmd, \"get_client\")"},{"line_number":483,"context_line":"        self.mox.StubOutWithMock(self.client.httpclient, \"request\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_edad0a9c","side":"PARENT","line":480,"range":{"start_line":480,"start_character":8,"end_line":480,"end_character":48},"in_reply_to":"fa6399be_6d157ae3","updated":"2016-10-13 23:17:47.000000000","message":"but they are not test cases, they are just some codes which are not used at all.","commit_id":"98a6ea328a3f9d9c1a9eeb66a30dcdfa99cec9ad"},{"author":{"_account_id":13485,"name":"Sripriya Seetharam","email":"sseetha@brocade.com","username":"Sripriya"},"change_message_id":"fdf09988863ab8fa69cf6b7467c706a64034e93d","unresolved":false,"context_lines":[{"line_number":477,"context_line":"            self.assertIn(\u0027myid1\u0027, _str)"},{"line_number":478,"context_line":"        return _str"},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"    def _test_list_sub_resources_with_pagination(self, resources, api_resource,"},{"line_number":481,"context_line":"                                                 cmd, myid):"},{"line_number":482,"context_line":"        self.mox.StubOutWithMock(cmd, \"get_client\")"},{"line_number":483,"context_line":"        self.mox.StubOutWithMock(self.client.httpclient, \"request\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_6d157ae3","side":"PARENT","line":480,"range":{"start_line":480,"start_character":8,"end_line":480,"end_character":48},"in_reply_to":"fa6399be_db1e436f","updated":"2016-10-13 23:15:21.000000000","message":"sure, we can create a bug to add pagination and filtering support in tacker and then add specific unit tests/ functional tests to test this feature. but let us retain the existing base tests here for now.","commit_id":"98a6ea328a3f9d9c1a9eeb66a30dcdfa99cec9ad"},{"author":{"_account_id":13485,"name":"Sripriya Seetharam","email":"sseetha@brocade.com","username":"Sripriya"},"change_message_id":"3c8a06ac66c0a448c37789b136b11c8122b603bc","unresolved":false,"context_lines":[{"line_number":477,"context_line":"            self.assertIn(\u0027myid1\u0027, _str)"},{"line_number":478,"context_line":"        return _str"},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"    def _test_list_sub_resources_with_pagination(self, resources, api_resource,"},{"line_number":481,"context_line":"                                                 cmd, myid):"},{"line_number":482,"context_line":"        self.mox.StubOutWithMock(cmd, \"get_client\")"},{"line_number":483,"context_line":"        self.mox.StubOutWithMock(self.client.httpclient, \"request\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_6d449ab6","side":"PARENT","line":480,"range":{"start_line":480,"start_character":8,"end_line":480,"end_character":48},"in_reply_to":"fa6399be_edad0a9c","updated":"2016-10-13 23:30:06.000000000","message":"yeah, they are more like common code base/util for pagination test cases, and developers have taken some effort to add these in the first place. IMO, there is no harm retaining them (since we will again add back later as part of pagination support). again, this decision is a low priority for now.","commit_id":"98a6ea328a3f9d9c1a9eeb66a30dcdfa99cec9ad"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"c98b9fd86c05ab8f3b48d72e9e92655afb1a2bde","unresolved":false,"context_lines":[{"line_number":477,"context_line":"            self.assertIn(\u0027myid1\u0027, _str)"},{"line_number":478,"context_line":"        return _str"},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"    def _test_list_sub_resources_with_pagination(self, resources, api_resource,"},{"line_number":481,"context_line":"                                                 cmd, myid):"},{"line_number":482,"context_line":"        self.mox.StubOutWithMock(cmd, \"get_client\")"},{"line_number":483,"context_line":"        self.mox.StubOutWithMock(self.client.httpclient, \"request\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_db1e436f","side":"PARENT","line":480,"range":{"start_line":480,"start_character":8,"end_line":480,"end_character":48},"in_reply_to":"fa6399be_effb4579","updated":"2016-10-13 23:00:44.000000000","message":"how about raising a bug to do it?\n\nsince currently there are no pagination cases.\n\nAlso I think we should do these kind of testing in integration tests.","commit_id":"98a6ea328a3f9d9c1a9eeb66a30dcdfa99cec9ad"}],"tackerclient/tests/unit/vm/test_cli10_vim.py":[{"author":{"_account_id":13485,"name":"Sripriya Seetharam","email":"sseetha@brocade.com","username":"Sripriya"},"change_message_id":"366066f8e99a40bc16c90df44d80fadde5697a67","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        parsed_args \u003d cmd_parser.parse_args(args)"},{"line_number":98,"context_line":"        result \u003d cmd.take_action(parsed_args)"},{"line_number":99,"context_line":"        res_data \u003d [res for res in result[1]]"},{"line_number":100,"context_line":"        self.mox.VerifyAll()"},{"line_number":101,"context_line":"        self.mox.UnsetStubs()"},{"line_number":102,"context_line":"        for res, exp in zip(res_data, expected_data):"},{"line_number":103,"context_line":"            self.assertEqual(len(exp), len(res))"}],"source_content_type":"text/x-python","patch_set":4,"id":"bab6814e_4a091edd","side":"PARENT","line":100,"range":{"start_line":100,"start_character":17,"end_line":100,"end_character":26},"updated":"2016-05-24 19:30:07.000000000","message":"please do the equivalent with mock objects and assert that they are called","commit_id":"cce904b24b60ee31523bfd333898be434bcd2f8e"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"0799f7900302a1c29862642ce093f5bed4d68bf2","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            test_cli10.MyApp(sys.stdout), None)"},{"line_number":88,"context_line":"        path \u003d getattr(self.client, self._RESOURCES + \u0027_path\u0027)"},{"line_number":89,"context_line":"        mock_get \u003d mock_vim.return_value"},{"line_number":90,"context_line":"        mock_get.get_client.return_value \u003d self.client"},{"line_number":91,"context_line":"        with mock.patch.object(self.client.httpclient, \u0027request\u0027) as mock_req:"},{"line_number":92,"context_line":"            comparator \u003d test_cli10.MyUrlComparator("},{"line_number":93,"context_line":"                test_cli10.end_url(path, format\u003dself.format), self.client)"}],"source_content_type":"text/x-python","patch_set":5,"id":"bab6814e_f5c40393","line":90,"range":{"start_line":90,"start_character":8,"end_line":90,"end_character":54},"updated":"2016-05-25 14:16:46.000000000","message":"I don\u0027t know why but I could not assert that get_client was called in this function. \n\nmock_get.get_client.assert_called_once_with() would result in an error something along the lines of, \"get_client called 0 times\"","commit_id":"b711263080b7363fe09fab15a57edeca658e6c28"}],"tackerclient/tests/unit/vm/test_cli10_vnf.py":[{"author":{"_account_id":13485,"name":"Sripriya Seetharam","email":"sseetha@brocade.com","username":"Sripriya"},"change_message_id":"366066f8e99a40bc16c90df44d80fadde5697a67","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                    test_cli10.MyResp(200), resstr))"},{"line_number":85,"context_line":"        args.extend([\u0027--request-format\u0027, self.format])"},{"line_number":86,"context_line":"        args.extend([\u0027--vnfd-id\u0027, \u0027vnfd\u0027])"},{"line_number":87,"context_line":"        self.mox.ReplayAll()"},{"line_number":88,"context_line":"        cmd_parser \u003d cmd.get_parser(\u0027create_\u0027 + resource)"},{"line_number":89,"context_line":"        shell.run_command(cmd, cmd_parser, args)"},{"line_number":90,"context_line":"        self.mox.VerifyAll()"}],"source_content_type":"text/x-python","patch_set":4,"id":"bab6814e_eaf8d2c6","side":"PARENT","line":87,"range":{"start_line":87,"start_character":17,"end_line":87,"end_character":26},"updated":"2016-05-24 19:30:07.000000000","message":"same comment as previous file","commit_id":"cce904b24b60ee31523bfd333898be434bcd2f8e"},{"author":{"_account_id":13485,"name":"Sripriya Seetharam","email":"sseetha@brocade.com","username":"Sripriya"},"change_message_id":"366066f8e99a40bc16c90df44d80fadde5697a67","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        plurals \u003d {\u0027vnfs\u0027: \u0027vnf\u0027}"},{"line_number":38,"context_line":"        super(CLITestV10VmVNFJSON, self).setUp(plurals\u003dplurals)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    @mock.patch.object(TackerCommand, \u0027get_client\u0027)"},{"line_number":41,"context_line":"    def _test_create_resource(self, resource, cmd,"},{"line_number":42,"context_line":"                              name, myid, args,"},{"line_number":43,"context_line":"                              position_names, position_values, mock_get,"}],"source_content_type":"text/x-python","patch_set":4,"id":"bab6814e_6ad22236","line":40,"range":{"start_line":40,"start_character":4,"end_line":40,"end_character":51},"updated":"2016-05-24 19:30:07.000000000","message":"this is not required if we are handling it in super class setup method.","commit_id":"dc839db9ecd5e458b7d0a05e6c0ec82bea2bb5a2"}]}
