)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"8acd0b1c95882fc27dc17d11470fffcf870087fe","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     qinchunhua \u003cqin.chunhua@zte.com.cn\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-07-11 01:00:53 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Replace mox.IsA  with Class IsType"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"As a equivalent of the mox.IsA() function"},{"line_number":10,"context_line":"from the legacy mox library, a new class IsType is added"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9ad45d7e_8b562dcc","line":7,"updated":"2016-08-10 11:07:53.000000000","message":"- This commit does not replace mox.IsA with a new proposed type, so this message is not correct. This patch just adds new classes to achieve the similar feature in mock.\n- also it should mention ContainsKeyValue as well as IsType.","commit_id":"122bdd22b47c7541cdc060241e2d1ff4dfdd9407"}],"neutronclient/tests/unit/test_cli20.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"8acd0b1c95882fc27dc17d11470fffcf870087fe","unresolved":false,"context_lines":[{"line_number":38,"context_line":"TOKEN \u003d \u0027testtoken\u0027"},{"line_number":39,"context_line":"ENDURL \u003d \u0027localurl\u0027"},{"line_number":40,"context_line":"REQUEST_ID \u003d \u0027test_request_id\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"class IsType(object):"},{"line_number":44,"context_line":"    \"\"\"Matches any instance of a specified type"}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad45d7e_2b9c610e","line":41,"updated":"2016-08-10 11:07:53.000000000","message":"I don\u0027t think test_cli20.py is the appropriate place to have these classes because they are not specific to CLI tests (test_cli20_xxxx).","commit_id":"122bdd22b47c7541cdc060241e2d1ff4dfdd9407"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"8acd0b1c95882fc27dc17d11470fffcf870087fe","unresolved":false,"context_lines":[{"line_number":39,"context_line":"ENDURL \u003d \u0027localurl\u0027"},{"line_number":40,"context_line":"REQUEST_ID \u003d \u0027test_request_id\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"class IsType(object):"},{"line_number":44,"context_line":"    \"\"\"Matches any instance of a specified type"},{"line_number":45,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad45d7e_0b76bd05","line":42,"updated":"2016-08-10 11:07:53.000000000","message":"IMHO these classes should be added to mock module itself.\nI am not sure it matches the upstream policy of mock. Do you have any information? Anyway it is better to check the upstream of mock. Could you add a TODO comment that it needs to be feedback to the upstream.","commit_id":"122bdd22b47c7541cdc060241e2d1ff4dfdd9407"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"8acd0b1c95882fc27dc17d11470fffcf870087fe","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        self.want_type \u003d want_type"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def __eq__(self, other):"},{"line_number":66,"context_line":"        return type(other) \u003d\u003d self.want_type"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def __ne__(self, other):"},{"line_number":69,"context_line":"        return type(other) !\u003d self.want_type"}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad45d7e_c0600404","line":66,"range":{"start_line":66,"start_character":15,"end_line":66,"end_character":44},"updated":"2016-08-10 11:07:53.000000000","message":"Can\u0027t we use isinstance?\n\n isinstance(other, self.want_type)\n\nIt is discouraged to use \u0027type()\u0027 in general.","commit_id":"122bdd22b47c7541cdc060241e2d1ff4dfdd9407"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"8acd0b1c95882fc27dc17d11470fffcf870087fe","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        return type(other) \u003d\u003d self.want_type"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def __ne__(self, other):"},{"line_number":69,"context_line":"        return type(other) !\u003d self.want_type"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def __repr__(self):"},{"line_number":72,"context_line":"        return \"\u003cIsType:\" + str(self.want_type) + \"\u003e\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad45d7e_e0538837","line":69,"updated":"2016-08-10 11:07:53.000000000","message":"ditto","commit_id":"122bdd22b47c7541cdc060241e2d1ff4dfdd9407"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"8acd0b1c95882fc27dc17d11470fffcf870087fe","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    assert that a particular dict parameter has a specific"},{"line_number":81,"context_line":"    key/value pair. It enables strict check than the built"},{"line_number":82,"context_line":"    in mock.ANY helper, and is the equivalent of the"},{"line_number":83,"context_line":"    mox.ContainsKeyValue() function from the legacy mox library"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    Example usage could be:"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad45d7e_abae91e3","line":83,"updated":"2016-08-10 11:07:53.000000000","message":"This implementation mirrors mox implementation, but there is no way to check both key1\u003dvalue1 and key2\u003dvalue2 are contained in the argument. mox provides mox.And [1] to do this, but I don\u0027t think it is a way we go to implement mox.And for mock. Instead my proposal is to change this class to accept a dict which contains expected key value pair. For example,\n\n  ContainsKeyValue({\u0027key1\u0027: \u0027value1\u0027, \u0027key2\u0027: \u0027value2\u0027}\n\nThis requires a given argument must contains both key1\u003dvalue1 and key2\u003dvalue2.\n\nThought?\n\n[1] http://www.programcreek.com/python/example/43303/mox.ContainsKeyValue","commit_id":"122bdd22b47c7541cdc060241e2d1ff4dfdd9407"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"8acd0b1c95882fc27dc17d11470fffcf870087fe","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        self.value \u003d value"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def __eq__(self, other):"},{"line_number":97,"context_line":"        return isinstance(other, dict)\\"},{"line_number":98,"context_line":"            and self.key in other\\"},{"line_number":99,"context_line":"            and other[self.key] \u003d\u003d self.value"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad45d7e_0be6bd43","line":97,"range":{"start_line":97,"start_character":38,"end_line":97,"end_character":39},"updated":"2016-08-10 11:07:53.000000000","message":"Generally speaking we don\u0027t use a backslash to break a line. Consider using parentheses for this purpose. Using a backslash is an exception for the nested with statement support.","commit_id":"122bdd22b47c7541cdc060241e2d1ff4dfdd9407"}]}
