)]}'
{"openstack_dashboard/test/api_tests/ceilometer_tests.py":[{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"75dbf09886764713343328d4503155229a42fed6","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        ret_list \u003d api.ceilometer.sample_list(self.request,"},{"line_number":35,"context_line":"                                              meter_name,"},{"line_number":36,"context_line":"                                              query\u003d[])"},{"line_number":37,"context_line":"        self.assertIsNotNone(ret_list)"},{"line_number":38,"context_line":"        for c in ret_list:"},{"line_number":39,"context_line":"            self.assertIsInstance(c, api.ceilometer.Sample)"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_4f14aae7","line":37,"updated":"2016-01-26 01:51:06.000000000","message":"Ok, I was just checking a sample code, and found something interesting.\n\nCode:\n\n import unittest\n \n class TestEmptyList(unittest.TestCase):\n \n   def test_emptyList(self):\n       p\u003d[]\n       self.assertIsNotNone(p)\n \n if __name__ \u003d\u003d \u0027__main__\u0027:\n     unittest.main()\n\n\nNow, this is similar to the code which you have here, and the code is is PASSING.\n\n reedip@NECubuntu:~$ python trial.py \n .\n -----------------------------------------\n Ran 1 test in 0.000s\n \n OK\n\n\nMy question now here is, as per the commit message, Empty List should fail the assertion( it currently passes ).\nHowever, as per the above test, it seems that the Empty list is passing the assertion here as well ( which I think is not what you want as per the commit message).\n\nIf the above code is ACTUALLY what you want, and ret_list is actually NONE and not the empty list [], then I suggest correct the commit message.\nIf in fact you will get ret_list as  [], then I suggest modify the assert to \n\n self.assertNotEqual([],ret_list)","commit_id":"da73e04e6a24a23dc2c4459ddcb2386f486da397"}]}
