)]}'
{"zaqarclient/tests/queues/flavor.py":[{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"dd17c3b00128dc53aa1ffaeecace02383636ebd9","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        self.assertEqual(flavor.pool, \u0027us\u0027)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def test_flavor_delete(self):"},{"line_number":117,"context_line":"        pool_data \u003d {\u0027uri\u0027: \u0027sqlite://\u0027,"},{"line_number":118,"context_line":"                     \u0027weight\u0027: 10,"},{"line_number":119,"context_line":"                     \u0027group\u0027: \u0027us\u0027}"},{"line_number":120,"context_line":"        pool \u003d self.client.pool(\u0027stomach\u0027, **pool_data)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_2f191cd1","line":117,"updated":"2015-06-25 16:51:15.000000000","message":"And here.","commit_id":"a6532199f00aa6e7b4f7da27f5df56ff3ffe367a"}],"zaqarclient/tests/queues/pool.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e2f596881eef219fbd19363b011ce045a7e14bdc","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            # ensure exists in the client instance"},{"line_number":56,"context_line":"            # since auto_create\u0027s default is True"},{"line_number":57,"context_line":"            pool \u003d self.client.pool(\u0027test\u0027)"},{"line_number":58,"context_line":"            self.addCleanup(pool.delete)"},{"line_number":59,"context_line":"            self.assertEqual(pool.name, \u0027test\u0027)"},{"line_number":60,"context_line":"            self.assertEqual(pool.weight, 10)"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_6cbf59d0","line":58,"updated":"2015-06-24 22:54:02.000000000","message":"Let me try to rephrase a bit what vkmc said.\n\nThe line is not needed because this test is not actually creating the pool. Now, bare with me while I explain you why. This test is `mocking` the transport\u0027s send method and returning a pre-built response - see L51-52 - which contain the \"expected\" response.\n\nIn other circunstances, like functional tests, this mock wouldn\u0027t exist and the pool would\u0027ve been created. Therefore, we\u0027d have needed the cleanup.\n\nWhenever there\u0027s a side-effect in a test, we need to make sure to clean it up before the test ends. It doesn\u0027t matter if the next test will create/clean the resource. Every test - in this case a test is a method that starts with test_ - *has* to clean its mess up before it ends.\n\nNot cleaning up things may leave unwanted things behind, it may make other tests fail because the environment is not clean and it could even make tests pass and hide errors. Each test is a *unit* that needs to run in a clean - or pre-set - environment.\n\nOne more thing. The test execution order is not guaranteed. The order of definition of these tests does not indicate the order in which they\u0027ll be executed.","commit_id":"7829418279367572aef19051f753c4b496aa1f68"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"4c055ab88b739f8dcb2b695f29cc12dd73b8b74c","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            # ensure exists in the client instance"},{"line_number":56,"context_line":"            # since auto_create\u0027s default is True"},{"line_number":57,"context_line":"            pool \u003d self.client.pool(\u0027test\u0027)"},{"line_number":58,"context_line":"            self.addCleanup(pool.delete)"},{"line_number":59,"context_line":"            self.assertEqual(pool.name, \u0027test\u0027)"},{"line_number":60,"context_line":"            self.assertEqual(pool.weight, 10)"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_8d4a8982","line":58,"updated":"2015-06-15 09:11:01.000000000","message":"This cleanup is actually not needed. Cleanups are executed after the tests end (generally after the tearDown() method, which in this case we don\u0027t have), and considering that we next have the test \"test_pool_delete\" we are already removing this pool. So, when the client tries to remove the pool, the pool doesn\u0027t exist (hence the \"Resource not found\" error).\n\nIf you add here pool.delete(), the next test will create the pool again (because we have the pool auto_create here https://github.com/openstack/python-zaqarclient/blob/master/zaqarclient/queues/v1/pool.py#L35. But it won\u0027t change anything.\n\nSo, summing up, this line is not needed and adding pool.delete() won\u0027t change much.","commit_id":"7829418279367572aef19051f753c4b496aa1f68"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"d787295007988f6f357085917d81e97681ba5e84","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            # ensure exists in the client instance"},{"line_number":56,"context_line":"            # since auto_create\u0027s default is True"},{"line_number":57,"context_line":"            pool \u003d self.client.pool(\u0027test\u0027)"},{"line_number":58,"context_line":"            self.addCleanup(pool.delete)"},{"line_number":59,"context_line":"            self.assertEqual(pool.name, \u0027test\u0027)"},{"line_number":60,"context_line":"            self.assertEqual(pool.weight, 10)"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_81ea8dd6","line":58,"in_reply_to":"fa32b979_6cbf59d0","updated":"2015-06-25 11:37:56.000000000","message":"+1 Fla - your clarification works for me too :D","commit_id":"7829418279367572aef19051f753c4b496aa1f68"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"dd17c3b00128dc53aa1ffaeecace02383636ebd9","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        self.addCleanup(pool.delete)"},{"line_number":91,"context_line":"        self.assertEqual(pool.name, \u0027test\u0027)"},{"line_number":92,"context_line":"        self.assertEqual(pool.weight, 10)"},{"line_number":93,"context_line":"        self.assertEqual(pool.uri, \u0027sqlite://\u0027)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def test_pool_create(self):"},{"line_number":96,"context_line":"        pool_data \u003d {\u0027weight\u0027: 10,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_2f427cab","line":93,"updated":"2015-06-25 16:51:15.000000000","message":"You should update this one too :)","commit_id":"a6532199f00aa6e7b4f7da27f5df56ff3ffe367a"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"b7664a86f4cf7f5d18829257736be6cbbffdd816","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            # ensure exists in the client instance"},{"line_number":56,"context_line":"            # since auto_create\u0027s default is True"},{"line_number":57,"context_line":"            pool \u003d self.client.pool(\u0027test\u0027)"},{"line_number":58,"context_line":"            self.addCleanup(pool.delete)"},{"line_number":59,"context_line":"            self.assertEqual(pool.name, \u0027test\u0027)"},{"line_number":60,"context_line":"            self.assertEqual(pool.weight, 10)"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba3cc151_96eb0a13","line":58,"updated":"2015-07-01 16:22:38.000000000","message":"Remove this one","commit_id":"971089c7f967a4d848be68d32ffafac903680de1"}]}
