)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"30f6323d333a7df18e78d0a1bd58c6d1cbb8ff7d","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Vitalii Lebedynskyi \u003cvetal.lebed@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-04-09 12:46:30 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Replace assert statements with asert methods"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Some of the test methods were using python assert"},{"line_number":10,"context_line":"statements for making assertions. This patch replaces"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"AAAAW3%2F%2F8wk%3D","line":7,"updated":"2014-04-09 09:52:56.000000000","message":"assert","commit_id":"b81cc68fbf0e2855f904ee041728ef10cf182a6b"},{"author":{"_account_id":9376,"name":"Vitalii Lebedynskyi","email":"vetal.lebed@gmail.com","username":"vetalll"},"change_message_id":"71ea46522cefb24dedb2bf145b2e0d1faa3e8e26","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Vitalii Lebedynskyi \u003cvetal.lebed@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-04-09 12:46:30 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Replace assert statements with asert methods"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Some of the test methods were using python assert"},{"line_number":10,"context_line":"statements for making assertions. This patch replaces"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"AAAAW3%2F%2F8jQ%3D","line":7,"in_reply_to":"AAAAW3%2F%2F8wk%3D","updated":"2014-04-09 10:16:11.000000000","message":"Sorry for this dummy mistake. Will be fixed.","commit_id":"b81cc68fbf0e2855f904ee041728ef10cf182a6b"}],"ceilometer/tests/base.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"a597cb21324a747dadd11322d9b5480e40950dc9","unresolved":false,"context_lines":[{"line_number":41,"context_line":"            0.0,"},{"line_number":42,"context_line":"            places\u003d5)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def assertIsEmpty(self, obj):"},{"line_number":45,"context_line":"        try:"},{"line_number":46,"context_line":"            if len(obj) !\u003d 0:"},{"line_number":47,"context_line":"                self.fail(\"%s is not empty\" % obj)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWn%2F%2F5tk%3D","line":44,"updated":"2014-04-08 16:08:23.000000000","message":"i don\u0027t think we need these custom assertions. we can easily describes this case (and we do in many places already) with assertEqual() assertions","commit_id":"6c156b8ff7b940075351852c86b50daf1ff93a87"},{"author":{"_account_id":9376,"name":"Vitalii Lebedynskyi","email":"vetal.lebed@gmail.com","username":"vetalll"},"change_message_id":"e1565205929a3478f7872e45241623d5d7a73265","unresolved":false,"context_lines":[{"line_number":41,"context_line":"            0.0,"},{"line_number":42,"context_line":"            places\u003d5)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def assertIsEmpty(self, obj):"},{"line_number":45,"context_line":"        try:"},{"line_number":46,"context_line":"            if len(obj) !\u003d 0:"},{"line_number":47,"context_line":"                self.fail(\"%s is not empty\" % obj)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWn%2F%2F3YA%3D","line":44,"in_reply_to":"AAAAWn%2F%2F3uo%3D","updated":"2014-04-08 21:07:59.000000000","message":"Also this way of checking collections is more readable and more clearly than AssertEqual(some_not_empty object, object).","commit_id":"6c156b8ff7b940075351852c86b50daf1ff93a87"},{"author":{"_account_id":9376,"name":"Vitalii Lebedynskyi","email":"vetal.lebed@gmail.com","username":"vetalll"},"change_message_id":"d9c8117261cd7c755ddacc0a488552baaba60ddd","unresolved":false,"context_lines":[{"line_number":41,"context_line":"            0.0,"},{"line_number":42,"context_line":"            places\u003d5)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def assertIsEmpty(self, obj):"},{"line_number":45,"context_line":"        try:"},{"line_number":46,"context_line":"            if len(obj) !\u003d 0:"},{"line_number":47,"context_line":"                self.fail(\"%s is not empty\" % obj)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWn%2F%2F3uo%3D","line":44,"in_reply_to":"AAAAWn%2F%2F5tk%3D","updated":"2014-04-08 20:24:56.000000000","message":"With custom assertions we can check length of any iterable object. It can be tuple, dict or another obejcts.","commit_id":"6c156b8ff7b940075351852c86b50daf1ff93a87"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"cc5c3f986899800205e21fea38bd26be6e67f332","unresolved":false,"context_lines":[{"line_number":49,"context_line":"            self.fail(\"%s doesn\u0027t have len attribute\" % obj)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def assertIsNotEmpty(self, obj):"},{"line_number":52,"context_line":"        try:"},{"line_number":53,"context_line":"            if len(obj) \u003c\u003d 0:"},{"line_number":54,"context_line":"                self.fail(\"%s is empty\")"},{"line_number":55,"context_line":"        except (TypeError, AttributeError):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWn%2F%2F8rU%3D","line":52,"updated":"2014-04-08 10:10:15.000000000","message":"why do we need \u003c ?","commit_id":"6c156b8ff7b940075351852c86b50daf1ff93a87"},{"author":{"_account_id":9376,"name":"Vitalii Lebedynskyi","email":"vetal.lebed@gmail.com","username":"vetalll"},"change_message_id":"e1565205929a3478f7872e45241623d5d7a73265","unresolved":false,"context_lines":[{"line_number":49,"context_line":"            self.fail(\"%s doesn\u0027t have len attribute\" % obj)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def assertIsNotEmpty(self, obj):"},{"line_number":52,"context_line":"        try:"},{"line_number":53,"context_line":"            if len(obj) \u003c\u003d 0:"},{"line_number":54,"context_line":"                self.fail(\"%s is empty\")"},{"line_number":55,"context_line":"        except (TypeError, AttributeError):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWn%2F%2F3XQ%3D","line":52,"in_reply_to":"AAAAWn%2F%2F8rU%3D","updated":"2014-04-08 21:07:59.000000000","message":"Length which is less than 0 is imvalid.","commit_id":"6c156b8ff7b940075351852c86b50daf1ff93a87"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"36799fa0b75cbdacec85121bf95282a70cbae95f","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    def assertIsNotEmpty(self, obj):"},{"line_number":52,"context_line":"        try:"},{"line_number":53,"context_line":"            if len(obj) \u003c\u003d 0:"},{"line_number":54,"context_line":"                self.fail(\"%s is empty\")"},{"line_number":55,"context_line":"        except (TypeError, AttributeError):"},{"line_number":56,"context_line":"            self.fail(\"%s doesn\u0027t have len attribute\" % obj)"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWn%2F%2F7sg%3D","line":54,"updated":"2014-04-08 12:26:20.000000000","message":"It looks like you forgot to specify the object here.","commit_id":"6c156b8ff7b940075351852c86b50daf1ff93a87"},{"author":{"_account_id":9376,"name":"Vitalii Lebedynskyi","email":"vetal.lebed@gmail.com","username":"vetalll"},"change_message_id":"e1565205929a3478f7872e45241623d5d7a73265","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    def assertIsNotEmpty(self, obj):"},{"line_number":52,"context_line":"        try:"},{"line_number":53,"context_line":"            if len(obj) \u003c\u003d 0:"},{"line_number":54,"context_line":"                self.fail(\"%s is empty\")"},{"line_number":55,"context_line":"        except (TypeError, AttributeError):"},{"line_number":56,"context_line":"            self.fail(\"%s doesn\u0027t have len attribute\" % obj)"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWn%2F%2F3X4%3D","line":54,"in_reply_to":"AAAAWn%2F%2F7sg%3D","updated":"2014-04-08 21:07:59.000000000","message":"Oh, thx, i will fix it.","commit_id":"6c156b8ff7b940075351852c86b50daf1ff93a87"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"cc5c3f986899800205e21fea38bd26be6e67f332","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        try:"},{"line_number":53,"context_line":"            if len(obj) \u003c\u003d 0:"},{"line_number":54,"context_line":"                self.fail(\"%s is empty\")"},{"line_number":55,"context_line":"        except (TypeError, AttributeError):"},{"line_number":56,"context_line":"            self.fail(\"%s doesn\u0027t have len attribute\" % obj)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWn%2F%2F8rE%3D","line":55,"updated":"2014-04-08 10:10:15.000000000","message":"isn\u0027t it better to print type(obj) instead of obj?","commit_id":"6c156b8ff7b940075351852c86b50daf1ff93a87"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"36799fa0b75cbdacec85121bf95282a70cbae95f","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        try:"},{"line_number":53,"context_line":"            if len(obj) \u003c\u003d 0:"},{"line_number":54,"context_line":"                self.fail(\"%s is empty\")"},{"line_number":55,"context_line":"        except (TypeError, AttributeError):"},{"line_number":56,"context_line":"            self.fail(\"%s doesn\u0027t have len attribute\" % obj)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAWn%2F%2F7qw%3D","line":55,"in_reply_to":"AAAAWn%2F%2F8rE%3D","updated":"2014-04-08 12:26:20.000000000","message":"+1 type(obj).\n\nI would also recommend changing the message to \"%s doesn\u0027t have length\". The same applies to L49","commit_id":"6c156b8ff7b940075351852c86b50daf1ff93a87"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"fa582c1d89338874d68e5e13bebc1494563b4c58","unresolved":false,"context_lines":[{"line_number":41,"context_line":"            0.0,"},{"line_number":42,"context_line":"            places\u003d5)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def assertIsEmpty(self, obj):"},{"line_number":45,"context_line":"        try:"},{"line_number":46,"context_line":"            if len(obj) !\u003d 0:"},{"line_number":47,"context_line":"                self.fail(\"%s is not empty\" % type(obj))"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2F9C8%3D","line":44,"updated":"2014-04-09 09:24:30.000000000","message":"I also agree with Vitalii that using these specific assertions will be more readable and easy that using a generic assertEqual.\n\nAlso assertEqual won\u0027t help in the case when two custom objects are being checked.","commit_id":"762e8061d621795cb6fdf4e2710c3b5b64067638"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"b1ad7389fc68d242481367d38ea414247348d834","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def assertIsNotEmpty(self, obj):"},{"line_number":52,"context_line":"        try:"},{"line_number":53,"context_line":"            if len(obj) \u003c\u003d 0:"},{"line_number":54,"context_line":"                self.fail(\"%s is empty\" % type(obj))"},{"line_number":55,"context_line":"        except (TypeError, AttributeError):"},{"line_number":56,"context_line":"            self.fail(\"%s doesn\u0027t have length\" % type(obj))"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2F9EA%3D","line":53,"updated":"2014-04-09 09:22:22.000000000","message":"After I had read Nadya\u0027s comment in the previous patch set I got concerned about the \u003c\u003d operator here.\n\nIndeed, even if a custom object is being checked and its __len__ function returns a negative number, the len() function will catch that and rise a ValueError which will say \"__len__() should return \u003e\u003d 0\". Since this kind of exceptions is not catcher here, it will go further and let the user know that the __len__ function is broken.\n\nRegarding to the above mentioned I\u0027d recommend changing this expression to len(obj) \u003d\u003d 0.","commit_id":"762e8061d621795cb6fdf4e2710c3b5b64067638"},{"author":{"_account_id":9376,"name":"Vitalii Lebedynskyi","email":"vetal.lebed@gmail.com","username":"vetalll"},"change_message_id":"60eef2f8c6fba4ebc34524d1dbeef969f8071574","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def assertIsNotEmpty(self, obj):"},{"line_number":52,"context_line":"        try:"},{"line_number":53,"context_line":"            if len(obj) \u003c\u003d 0:"},{"line_number":54,"context_line":"                self.fail(\"%s is empty\" % type(obj))"},{"line_number":55,"context_line":"        except (TypeError, AttributeError):"},{"line_number":56,"context_line":"            self.fail(\"%s doesn\u0027t have length\" % type(obj))"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2F88c%3D","line":53,"in_reply_to":"AAAAW3%2F%2F9EA%3D","updated":"2014-04-09 09:35:32.000000000","message":"Sorry, i didn\u0027t know it. I will fix.","commit_id":"762e8061d621795cb6fdf4e2710c3b5b64067638"}]}
