)]}'
{"glance/tests/unit/test_artifact_type_definition_framework.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b51d54ad2ef1bee15717fd91d47519583e092aa3","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        tt \u003d TestType(prop_with_allowed\u003d42)"},{"line_number":158,"context_line":"        self.assertEqual(42, tt.prop_with_allowed)"},{"line_number":159,"context_line":"        tt \u003d TestType(prop_with_allowed\u003dTrue)"},{"line_number":160,"context_line":"        self.assertTrue(tt.prop_with_allowed)"},{"line_number":161,"context_line":"        tt \u003d TestType(prop_with_allowed\u003d\u0027Foo\u0027)"},{"line_number":162,"context_line":"        self.assertEqual(\u0027Foo\u0027, tt.prop_with_allowed)"},{"line_number":163,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_8a4fd091","line":160,"updated":"2015-09-14 17:31:24.000000000","message":"This change is not equivalent to the old test.  Won\u0027t assertTrue(42), for example, pass where assertEqual(True, 42) will fail?  So you are no longer testing to ensure that the value *is* True, you have changed the test to see if the value is something that evaluates to True.\n\nThis line is where the problem jumped out at me, but I wonder whether it applies to the other lines as well.","commit_id":"c637f01743a62a127dd073a13c7f408742d5f203"},{"author":{"_account_id":6601,"name":"James Carey","email":"jecarey@yerac.com","username":"jecarey"},"change_message_id":"b01a0bb52312b6cbc14fd8dedea995e19840b846","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        tt \u003d TestType(prop_with_allowed\u003d42)"},{"line_number":158,"context_line":"        self.assertEqual(42, tt.prop_with_allowed)"},{"line_number":159,"context_line":"        tt \u003d TestType(prop_with_allowed\u003dTrue)"},{"line_number":160,"context_line":"        self.assertTrue(tt.prop_with_allowed)"},{"line_number":161,"context_line":"        tt \u003d TestType(prop_with_allowed\u003d\u0027Foo\u0027)"},{"line_number":162,"context_line":"        self.assertEqual(\u0027Foo\u0027, tt.prop_with_allowed)"},{"line_number":163,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_dbc111e6","line":160,"in_reply_to":"ba15a1d1_8a4fd091","updated":"2015-09-14 22:24:07.000000000","message":"I agree with Brian.   The table just below here:\n\n     https://docs.python.org/2/library/unittest.html#unittest.TestCase.debug\n\nsummarizes what Brian said:  The use of assertTrue(x) checks that \u0027bool(x) is True\u0027","commit_id":"c637f01743a62a127dd073a13c7f408742d5f203"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"5e6c8c9d84e0ad112be52707909022bacd64ae4f","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        tt \u003d TestType(prop_with_allowed\u003d42)"},{"line_number":158,"context_line":"        self.assertEqual(42, tt.prop_with_allowed)"},{"line_number":159,"context_line":"        tt \u003d TestType(prop_with_allowed\u003dTrue)"},{"line_number":160,"context_line":"        self.assertTrue(tt.prop_with_allowed)"},{"line_number":161,"context_line":"        tt \u003d TestType(prop_with_allowed\u003d\u0027Foo\u0027)"},{"line_number":162,"context_line":"        self.assertEqual(\u0027Foo\u0027, tt.prop_with_allowed)"},{"line_number":163,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_a25e4674","line":160,"in_reply_to":"ba15a1d1_9ce12901","updated":"2015-09-15 17:20:54.000000000","message":"I agree with Brian.\nUnless there are tests somewhere that are testing the correctness of object creation, this test maybe too permissive unintentionally. \nWell, I\u0027d say even if there are tests elsewhere around object creation, we shouldn\u0027t be too permissive in tests. Also, in this case, it\u0027s just a refactor and I don\u0027t think it\u0027s reason enough to take a chance on correctness.","commit_id":"c637f01743a62a127dd073a13c7f408742d5f203"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"854c991a0c51aa96dd8eba6449776147e1008d05","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        tt \u003d TestType(prop_with_allowed\u003d42)"},{"line_number":158,"context_line":"        self.assertEqual(42, tt.prop_with_allowed)"},{"line_number":159,"context_line":"        tt \u003d TestType(prop_with_allowed\u003dTrue)"},{"line_number":160,"context_line":"        self.assertTrue(tt.prop_with_allowed)"},{"line_number":161,"context_line":"        tt \u003d TestType(prop_with_allowed\u003d\u0027Foo\u0027)"},{"line_number":162,"context_line":"        self.assertEqual(\u0027Foo\u0027, tt.prop_with_allowed)"},{"line_number":163,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_894eb094","line":160,"in_reply_to":"ba15a1d1_a25e4674","updated":"2015-09-16 08:56:35.000000000","message":"Hi Brian, Hemanth,\n\nThank you for your explanation, its clear to me now.","commit_id":"c637f01743a62a127dd073a13c7f408742d5f203"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"cf8efeded0a524bec0142d609b7c8a18e971f686","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        tt \u003d TestType(prop_with_allowed\u003d42)"},{"line_number":158,"context_line":"        self.assertEqual(42, tt.prop_with_allowed)"},{"line_number":159,"context_line":"        tt \u003d TestType(prop_with_allowed\u003dTrue)"},{"line_number":160,"context_line":"        self.assertTrue(tt.prop_with_allowed)"},{"line_number":161,"context_line":"        tt \u003d TestType(prop_with_allowed\u003d\u0027Foo\u0027)"},{"line_number":162,"context_line":"        self.assertEqual(\u0027Foo\u0027, tt.prop_with_allowed)"},{"line_number":163,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_9ce12901","line":160,"in_reply_to":"ba15a1d1_c6736ee6","updated":"2015-09-15 16:41:40.000000000","message":"Abhishek,\n\nYou bring up a good point about these lines.  What exactly is being tested here?  If we are so confident that what we do at line 159 is going to result in a value of True being returned, then why are we bothering to check this at all?\n\nMy feeling is we should either use assertEqual(True, x) or we should eliminate these lines if it doesn\u0027t matter.","commit_id":"c637f01743a62a127dd073a13c7f408742d5f203"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"134d7265b76aa3613862d5475f6c56dba0ba6630","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        tt \u003d TestType(prop_with_allowed\u003d42)"},{"line_number":158,"context_line":"        self.assertEqual(42, tt.prop_with_allowed)"},{"line_number":159,"context_line":"        tt \u003d TestType(prop_with_allowed\u003dTrue)"},{"line_number":160,"context_line":"        self.assertTrue(tt.prop_with_allowed)"},{"line_number":161,"context_line":"        tt \u003d TestType(prop_with_allowed\u003d\u0027Foo\u0027)"},{"line_number":162,"context_line":"        self.assertEqual(\u0027Foo\u0027, tt.prop_with_allowed)"},{"line_number":163,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_c6736ee6","line":160,"in_reply_to":"ba15a1d1_dbc111e6","updated":"2015-09-15 06:59:51.000000000","message":"Hi Brian, James,\n\nThank you for your input. I got your point but if you check line #159 \u0027prop_with_allowed\" is set to True explicitly and at line #160 it will be True only. Similar case are there at line #168 and it is checked for True at #169 and #173","commit_id":"c637f01743a62a127dd073a13c7f408742d5f203"}],"glance/tests/unit/test_cache_middleware.py":[{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"9a0829cb576209e1a958237f52a62e89d19cf74a","unresolved":false,"context_lines":[{"line_number":730,"context_line":"        request.context \u003d context.RequestContext(roles\u003d[\u0027member\u0027])"},{"line_number":731,"context_line":"        resp \u003d webob.Response(request\u003drequest)"},{"line_number":732,"context_line":"        actual \u003d cache_filter.process_response(resp)"},{"line_number":733,"context_line":"        self.assertEqual(resp, actual)"},{"line_number":734,"context_line":""},{"line_number":735,"context_line":"    def test_v1_process_response_image_meta_not_found(self):"},{"line_number":736,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_bb3eb627","line":733,"updated":"2015-09-21 09:15:28.000000000","message":"Regardless variable naming this was originally correct, no?","commit_id":"ee9ecfca16a0f9e65ff0754796078aed515cb6b1"},{"author":{"_account_id":10795,"name":"Rajesh Tailor","email":"tailor.rajesh88@gmail.com","username":"rajeshtailor"},"change_message_id":"1394ee4a474f6a6bf634218ae3fdfde17aba0c7b","unresolved":false,"context_lines":[{"line_number":730,"context_line":"        request.context \u003d context.RequestContext(roles\u003d[\u0027member\u0027])"},{"line_number":731,"context_line":"        resp \u003d webob.Response(request\u003drequest)"},{"line_number":732,"context_line":"        actual \u003d cache_filter.process_response(resp)"},{"line_number":733,"context_line":"        self.assertEqual(resp, actual)"},{"line_number":734,"context_line":""},{"line_number":735,"context_line":"    def test_v1_process_response_image_meta_not_found(self):"},{"line_number":736,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_36871b14","line":733,"in_reply_to":"ba15a1d1_bb3eb627","updated":"2015-09-21 10:27:27.000000000","message":"This proposed change is correct, as this test checks success case for process_response method of cache_filter class. \n\nThe process_response method intercepts response object coming from image resource and checks status_code (here it is 200) before processing response and if condition (200 \u003c\u003d status_code \u003c\u003d 300) satisfies, it returns the resp as is.\n\nPlease check line #609 in glance/tests/unit/test_cache_middleware.py module, where assertEqual is called with proper params.\n\nFor reference please check process_response method in https://github.com/openstack/glance/blob/master/glance/api/middleware/cache.py module.","commit_id":"ee9ecfca16a0f9e65ff0754796078aed515cb6b1"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"9a0829cb576209e1a958237f52a62e89d19cf74a","unresolved":false,"context_lines":[{"line_number":835,"context_line":"        request.context \u003d context.RequestContext(roles\u003d[\u0027member\u0027])"},{"line_number":836,"context_line":"        resp \u003d webob.Response(request\u003drequest)"},{"line_number":837,"context_line":"        actual \u003d cache_filter.process_response(resp)"},{"line_number":838,"context_line":"        self.assertEqual(resp, actual)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_7b1fbeb7","line":838,"updated":"2015-09-21 09:15:28.000000000","message":"ditto","commit_id":"ee9ecfca16a0f9e65ff0754796078aed515cb6b1"},{"author":{"_account_id":10795,"name":"Rajesh Tailor","email":"tailor.rajesh88@gmail.com","username":"rajeshtailor"},"change_message_id":"1394ee4a474f6a6bf634218ae3fdfde17aba0c7b","unresolved":false,"context_lines":[{"line_number":835,"context_line":"        request.context \u003d context.RequestContext(roles\u003d[\u0027member\u0027])"},{"line_number":836,"context_line":"        resp \u003d webob.Response(request\u003drequest)"},{"line_number":837,"context_line":"        actual \u003d cache_filter.process_response(resp)"},{"line_number":838,"context_line":"        self.assertEqual(resp, actual)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_37407607","line":838,"in_reply_to":"ba15a1d1_7b1fbeb7","updated":"2015-09-21 10:27:27.000000000","message":"ditto","commit_id":"ee9ecfca16a0f9e65ff0754796078aed515cb6b1"}]}
