)]}'
{"novaclient/tests/v1_1/test_security_groups.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"fcfe07823b77d6ad95eaba45cc1ed8bef2f1f412","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def test_get_security_groups_by_uuid(self):"},{"line_number":35,"context_line":"        sg \u003d cs.security_groups.get(1)"},{"line_number":36,"context_line":"        self.assertRaises(webtest.app.AppError,"},{"line_number":37,"context_line":"          cs.assert_called, \u0027GET\u0027,"},{"line_number":38,"context_line":"          \u0027/os-security-groups/c0c32459-dc5f-44dc-9a0a-473b28bac831\u0027)"},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2Fa0M%3D","line":36,"updated":"2013-11-06 17:18:17.000000000","message":"What is webtest?  Why would cs.assert_called() raise a webtest.app.AppError?\n\nThis isn\u0027t at all what I would have expected this test to look like.  I would have expected a test on novaclient.v1_1.shell._get_secgroup(), proving that it accepts both integers and UUIDs.  I don\u0027t see how the change you introduced could be at all related to the security_groups module itself, which is what this test file works with.\n\nWhat I would expect is a test class added to novaclient/tests/v1_1/test_shell.py looking something like the following:\n\n    class GetSecgroupTest(utils.TestCase):\n        def test_with_integer(self):\n            cs \u003d mock.Mock(**{\n                \u0027security_groups.get.return_value\u0027: \u0027sec_group\u0027,\n            })\n\n            result \u003d novaclient.v1_1.shell._get_secgroup(cs, 1)\n\n            self.assertEqual(result, \u0027sec_group\u0027)\n            cs.security_groups.get.assert_called_once_with(1)\n\n        def test_with_uuid(self):\n            cs \u003d mock.Mock(**{\n                \u0027security_groups.get.return_value\u0027: \u0027sec_group\u0027,\n            })\n\n            result \u003d novaclient.v1_1.shell._get_secgroup(\n                cs, \u0027c0c32459-dc5f-44dc-9a0a-473b28bac831\u0027)\n\n            self.assertEqual(result, \u0027sec_group\u0027)\n            cs.security_groups.get.assert_called_once_with(\n                \u0027c0c32459-dc5f-44dc-9a0a-473b28bac831\u0027)\n\nYou would also need to alter the imports to read like so:\n\n    import novaclient.client\n    from novaclient import exceptions\n    from novaclient.openstack.common import timeutils\n    import novaclient.shell\n    from novaclient.tests.v1_1 import fakes\n    from novaclient.tests import utils\n    import novaclient.v1_1.shell\n\n(Note the addition of the \"import novaclient.v1_1.shell\" line.)\n\nI hope this clarifies what I\u0027m looking for, but please feel free to ask questions…","commit_id":"663d1c99b5abaeab60cc1bab3f82e53070cf09d5"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"02594f049d896de4f66f6ae37a7beb729c0e45f2","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def test_get_security_groups_by_uuid(self):"},{"line_number":35,"context_line":"        sg \u003d cs.security_groups.get(1)"},{"line_number":36,"context_line":"        self.assertRaises(webtest.app.AppError,"},{"line_number":37,"context_line":"          cs.assert_called, \u0027GET\u0027,"},{"line_number":38,"context_line":"          \u0027/os-security-groups/c0c32459-dc5f-44dc-9a0a-473b28bac831\u0027)"},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2FaHE%3D","line":36,"in_reply_to":"AAAATn%2F%2Fa0M%3D","updated":"2013-11-07 01:56:41.000000000","message":"Kevin, thanks for your detail comments, I will try to follow, and let you know the question if required.","commit_id":"663d1c99b5abaeab60cc1bab3f82e53070cf09d5"}],"novaclient/v1_1/shell.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"ba3866aadf66183b6e1209bf8253f3c4db845ed4","unresolved":false,"context_lines":[{"line_number":2101,"context_line":"def _get_secgroup(cs, secgroup):"},{"line_number":2102,"context_line":"    # Check secgroup is an ID"},{"line_number":2103,"context_line":"    if utils.is_integer_like(strutils.safe_encode(secgroup)) \\"},{"line_number":2104,"context_line":"         or uuidutils.is_uuid_like(strutils.safe_encode(secgroup)):"},{"line_number":2105,"context_line":"        try:"},{"line_number":2106,"context_line":"            return cs.security_groups.get(secgroup)"},{"line_number":2107,"context_line":"        except exceptions.NotFound:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2FfdU%3D","line":2104,"updated":"2013-11-04 17:05:25.000000000","message":"Please use parentheses to eliminate the backslash continuation…","commit_id":"c7b2c0773b59270b7570774c14e0f8532dfe6c00"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"062244681348cae1a52299d5f46bdf9bd84b5ad5","unresolved":false,"context_lines":[{"line_number":2101,"context_line":"def _get_secgroup(cs, secgroup):"},{"line_number":2102,"context_line":"    # Check secgroup is an ID"},{"line_number":2103,"context_line":"    if utils.is_integer_like(strutils.safe_encode(secgroup)) \\"},{"line_number":2104,"context_line":"         or uuidutils.is_uuid_like(strutils.safe_encode(secgroup)):"},{"line_number":2105,"context_line":"        try:"},{"line_number":2106,"context_line":"            return cs.security_groups.get(secgroup)"},{"line_number":2107,"context_line":"        except exceptions.NotFound:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2Fezs%3D","line":2104,"in_reply_to":"AAAATn%2F%2FfdU%3D","updated":"2013-11-05 01:59:04.000000000","message":"Kevin, thanks for your comments, will add parentheses.","commit_id":"c7b2c0773b59270b7570774c14e0f8532dfe6c00"}]}
