)]}'
{"openstack/message/v1/claim.py":[{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"bcf2d902a120fe4aa874ccf82fd96850cb0257f9","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            # The Message Service will respond with a 204 and no content in"},{"line_number":69,"context_line":"            # the body when there are no messages to claim. The transport"},{"line_number":70,"context_line":"            # layer doesn\u0027t like that and we have to correct for it here."},{"line_number":71,"context_line":"            # Ultimately it\u0027s a bug in the v1.0 Message Service API."},{"line_number":72,"context_line":"            if e.response.status_code !\u003d 204:"},{"line_number":73,"context_line":"                raise e"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_681dbe72","line":71,"updated":"2015-06-29 15:46:01.000000000","message":"Could you perhaps add wording here to cover your note in the commit message about it actually being fixed in 1.1 with a TODO? That would probably be nice for when we go to add 1.1, since we\u0027ll probably copy/paste v1 directory as a basis and then have a note for how to improve it.","commit_id":"798868c4dba19ccf740762af46d0ae8cef3628d9"},{"author":{"_account_id":1112,"name":"Everett Toews","email":"everett.toews@rackspace.com","username":"everett-toews"},"change_message_id":"28f5e0ba9a8aff5b19a50ad8c775cc7247d0a847","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            # The Message Service will respond with a 204 and no content in"},{"line_number":69,"context_line":"            # the body when there are no messages to claim. The transport"},{"line_number":70,"context_line":"            # layer doesn\u0027t like that and we have to correct for it here."},{"line_number":71,"context_line":"            # Ultimately it\u0027s a bug in the v1.0 Message Service API."},{"line_number":72,"context_line":"            if e.response.status_code !\u003d 204:"},{"line_number":73,"context_line":"                raise e"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_0df6728f","line":71,"in_reply_to":"ba3cc151_231117ad","updated":"2015-06-29 22:16:47.000000000","message":"Done","commit_id":"798868c4dba19ccf740762af46d0ae8cef3628d9"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"be64477b31c66e9d87cc5f462db3365d94f6f7bd","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            # The Message Service will respond with a 204 and no content in"},{"line_number":69,"context_line":"            # the body when there are no messages to claim. The transport"},{"line_number":70,"context_line":"            # layer doesn\u0027t like that and we have to correct for it here."},{"line_number":71,"context_line":"            # Ultimately it\u0027s a bug in the v1.0 Message Service API."},{"line_number":72,"context_line":"            if e.response.status_code !\u003d 204:"},{"line_number":73,"context_line":"                raise e"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_231117ad","line":71,"in_reply_to":"ba3cc151_681dbe72","updated":"2015-06-29 16:00:37.000000000","message":"A test for this would be nice too.","commit_id":"798868c4dba19ccf740762af46d0ae8cef3628d9"},{"author":{"_account_id":1112,"name":"Everett Toews","email":"everett.toews@rackspace.com","username":"everett-toews"},"change_message_id":"28f5e0ba9a8aff5b19a50ad8c775cc7247d0a847","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            # The Message Service will respond with a 204 and no content in"},{"line_number":69,"context_line":"            # the body when there are no messages to claim. The transport"},{"line_number":70,"context_line":"            # layer doesn\u0027t like that and we have to correct for it here."},{"line_number":71,"context_line":"            # Ultimately it\u0027s a bug in the v1.0 Message Service API."},{"line_number":72,"context_line":"            if e.response.status_code !\u003d 204:"},{"line_number":73,"context_line":"                raise e"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba3cc151_edf8ee7e","line":71,"in_reply_to":"ba3cc151_681dbe72","updated":"2015-06-29 22:16:47.000000000","message":"Done","commit_id":"798868c4dba19ccf740762af46d0ae8cef3628d9"}],"openstack/tests/unit/message/v1/test_claim.py":[{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"98109d3e40e22c32ead0078b953084b6d2b0c936","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        sot \u003d claim.Claim()"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        list(sot.claim_messages("},{"line_number":74,"context_line":"            sess, claim.Claim.new(client\u003dCLIENT, queue\u003dQUEUE, **FAKE)))"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def test_claim_messages_invalid_response(self):"},{"line_number":77,"context_line":"        sess \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_79c0f97c","line":74,"updated":"2015-06-30 17:11:12.000000000","message":"Nothing to assertEqual([], ...) here?","commit_id":"f18a17962954537f09158a679d630afd40b9a994"},{"author":{"_account_id":1112,"name":"Everett Toews","email":"everett.toews@rackspace.com","username":"everett-toews"},"change_message_id":"d72aa85121fb30c5bdbd7d1c4dbce00ff751a8a6","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        sot \u003d claim.Claim()"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        list(sot.claim_messages("},{"line_number":74,"context_line":"            sess, claim.Claim.new(client\u003dCLIENT, queue\u003dQUEUE, **FAKE)))"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def test_claim_messages_invalid_response(self):"},{"line_number":77,"context_line":"        sess \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_0a758396","line":74,"in_reply_to":"3a50d1a3_d2e25bd5","updated":"2015-07-28 12:50:54.000000000","message":"Done","commit_id":"f18a17962954537f09158a679d630afd40b9a994"},{"author":{"_account_id":1112,"name":"Everett Toews","email":"everett.toews@rackspace.com","username":"everett-toews"},"change_message_id":"fa9eebf8a16675fb95369eab6ba5b912aebb492c","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        sot \u003d claim.Claim()"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        list(sot.claim_messages("},{"line_number":74,"context_line":"            sess, claim.Claim.new(client\u003dCLIENT, queue\u003dQUEUE, **FAKE)))"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def test_claim_messages_invalid_response(self):"},{"line_number":77,"context_line":"        sess \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_f936e24f","line":74,"in_reply_to":"ba3cc151_79c0f97c","updated":"2015-07-08 23:42:35.000000000","message":"claim_messages() literally returns no content in this scenario. Not even an empty JSON {} or []. Hence the 204.\n\nI\u0027m just testing this code path doesn\u0027t blow up. There\u0027s just nothing of value to assert.","commit_id":"f18a17962954537f09158a679d630afd40b9a994"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"2b38d2d370303e5986d4c4249a11cc0a06aec61d","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        sot \u003d claim.Claim()"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        list(sot.claim_messages("},{"line_number":74,"context_line":"            sess, claim.Claim.new(client\u003dCLIENT, queue\u003dQUEUE, **FAKE)))"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def test_claim_messages_invalid_response(self):"},{"line_number":77,"context_line":"        sess \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_d2e25bd5","line":74,"in_reply_to":"ba3cc151_f936e24f","updated":"2015-07-20 19:43:32.000000000","message":"I suppose you could assert that the list is empty.","commit_id":"f18a17962954537f09158a679d630afd40b9a994"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"98109d3e40e22c32ead0078b953084b6d2b0c936","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        try:"},{"line_number":85,"context_line":"            list(sot.claim_messages("},{"line_number":86,"context_line":"                sess, claim.Claim.new(client\u003dCLIENT, queue\u003dQUEUE, **FAKE)))"},{"line_number":87,"context_line":"        except exceptions.InvalidResponse as e:"},{"line_number":88,"context_line":"            self.assertEqual(400, e.response.status_code)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_7947991d","line":86,"updated":"2015-06-30 17:11:12.000000000","message":"What you\u0027ve done is fine, but I think an assertRaises would of done.","commit_id":"f18a17962954537f09158a679d630afd40b9a994"},{"author":{"_account_id":1112,"name":"Everett Toews","email":"everett.toews@rackspace.com","username":"everett-toews"},"change_message_id":"fa9eebf8a16675fb95369eab6ba5b912aebb492c","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        try:"},{"line_number":85,"context_line":"            list(sot.claim_messages("},{"line_number":86,"context_line":"                sess, claim.Claim.new(client\u003dCLIENT, queue\u003dQUEUE, **FAKE)))"},{"line_number":87,"context_line":"        except exceptions.InvalidResponse as e:"},{"line_number":88,"context_line":"            self.assertEqual(400, e.response.status_code)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_d45403c7","line":86,"in_reply_to":"ba3cc151_7947991d","updated":"2015-07-08 23:42:35.000000000","message":"I really wanted to. I tried this first.\n\n    with self.assertRaises(exceptions.InvalidResponse) as e:\n        list(sot.claim_messages(\n            sess, claim.Claim.new(client\u003dCLIENT, queue\u003dQUEUE, **FAKE)))\n\n    self.assertEquals(400, e.status_code)\n\nbut\n\n    TypeError: assertRaises() takes at least 3 arguments (2 given)\n\nbecause we inherit from TestCase and TestCase overrides \n\n    assertRaises(self, excClass, callableObj, *args, **kwargs)\n\nso callableObj cannot be None. :/\n\nThen I tried\n\n    self.assertRaises(exceptions.InvalidResponse, lambda: list(sot.claim_messages(\n        sess, claim.Claim.new(client\u003dCLIENT, queue\u003dQUEUE, **FAKE))))\n\nwhich does work but ick and I can\u0027t the the exception object to assert on it.\n\nI could change it but I think the test would be slightly less useful. Currently my preference is to leave it as is unless there\u0027s some better way to do the above that works well.","commit_id":"f18a17962954537f09158a679d630afd40b9a994"}]}
