)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"8bd945b376ef15a3cae06cb4c19aab80eb386e63","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch cleans up the unit tests related to the"},{"line_number":10,"context_line":"_check_instance_build_time"},{"line_number":11,"context_line":"method so that they are actually verifying the expected vm_state value"},{"line_number":12,"context_line":"when the instance is updated."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This patch also removes the test_instance_build_timeout test case"},{"line_number":15,"context_line":"since it was completely redundant with the other one modified"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAATn%2F%2FYDM%3D","line":12,"updated":"2013-11-07 22:18:26.000000000","message":"This wrapping broke my brain - reflowed in vim:\n\n This patch cleans up the unit tests related to the\n _check_instance_build_time method so that they are actually verifying\n the expected vm_state value when the instance is updated.","commit_id":"340414425d7dbdd7500ddec3e39e5853a730ca0f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"47cd7577ccf65a15a9b5cb747e564798a4814968","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch cleans up the unit tests related to the"},{"line_number":10,"context_line":"_check_instance_build_time"},{"line_number":11,"context_line":"method so that they are actually verifying the expected vm_state value"},{"line_number":12,"context_line":"when the instance is updated."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This patch also removes the test_instance_build_timeout test case"},{"line_number":15,"context_line":"since it was completely redundant with the other one modified"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAATn%2F%2FVas%3D","line":12,"in_reply_to":"AAAATn%2F%2FYDM%3D","updated":"2013-11-09 19:21:11.000000000","message":"Done","commit_id":"340414425d7dbdd7500ddec3e39e5853a730ca0f"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"23f01fa54e712f3daa99da3b6084bfdb2a3ee368","unresolved":false,"context_lines":[{"line_number":15,"context_line":"here. I checked the git history and both test cases were added"},{"line_number":16,"context_line":"in the same commit which confirms that they weren\u0027t added for"},{"line_number":17,"context_line":"different reasons, i.e. separate bug fixes/use cases."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: Ib384c84e2954bd303661386256053b3c1ad38239"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAATn%2F9%2BJ4%3D","line":18,"updated":"2013-12-03 21:48:25.000000000","message":"Add \u0027Partial-Bug/Related-Bug: 1241117\u0027 here?","commit_id":"ace4c9c0545e4887b9389a8136414adac101f048"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"134c02128b3df3e36347094c1bc28ffa442f8572","unresolved":false,"context_lines":[{"line_number":15,"context_line":"here. I checked the git history and both test cases were added"},{"line_number":16,"context_line":"in the same commit which confirms that they weren\u0027t added for"},{"line_number":17,"context_line":"different reasons, i.e. separate bug fixes/use cases."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: Ib384c84e2954bd303661386256053b3c1ad38239"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAATn%2F993w%3D","line":18,"in_reply_to":"AAAATn%2F9%2BDk%3D","updated":"2013-12-03 22:31:28.000000000","message":"Thanks for the info. I am fine with the explanation.","commit_id":"ace4c9c0545e4887b9389a8136414adac101f048"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4999e04279f2f90aed1db2afe93f04083b8b36b8","unresolved":false,"context_lines":[{"line_number":15,"context_line":"here. I checked the git history and both test cases were added"},{"line_number":16,"context_line":"in the same commit which confirms that they weren\u0027t added for"},{"line_number":17,"context_line":"different reasons, i.e. separate bug fixes/use cases."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: Ib384c84e2954bd303661386256053b3c1ad38239"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"AAAATn%2F9%2BDk%3D","line":18,"in_reply_to":"AAAATn%2F9%2BJ4%3D","updated":"2013-12-03 22:02:43.000000000","message":"So the history is I found the unit tests while working on a fix for bug 1241117 which was later determined that it wasn\u0027t a bug and we wouldn\u0027t fix it, but I still had it on my topic branch so that\u0027s why it\u0027s still my topic branch name.\n\nAt best I\u0027d make it Related-Bug: #1241117 but not sure if it\u0027s necessary.  I\u0027ll do it though if others really want it.","commit_id":"ace4c9c0545e4887b9389a8136414adac101f048"}],"nova/tests/compute/test_compute.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"db38f7179e87f71da28c40ef074447c1b1188d07","unresolved":false,"context_lines":[{"line_number":5207,"context_line":"        self.assertFalse(called[\u0027get_all\u0027])"},{"line_number":5208,"context_line":"        self.assertEqual(called[\u0027set_error_state\u0027], 0)"},{"line_number":5209,"context_line":""},{"line_number":5210,"context_line":"    def test_instance_build_timeout(self):"},{"line_number":5211,"context_line":"        self.flags(instance_build_timeout\u003d30)"},{"line_number":5212,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":5213,"context_line":"        created_at \u003d timeutils.utcnow() + datetime.timedelta(seconds\u003d-60)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FSTY%3D","line":5210,"updated":"2013-10-18 12:24:24.000000000","message":"I thought about consolidating these two tests into a common method and then pass in a list if expired_instances and current_instances, join them and then run the assertions over the expired_instances. So in the case of test_instance_build_timeout you\u0027d have 5 expired_instances and nothing in the current_instances list. In test_instance_build_timeout_mixed_instances you\u0027d have 4 in expired_instances and 1 in current_instances.\n\nThe problem with that idea is you still have to create the fake instances in the individual test cases, which is a lot of copy/paste code.\n\nThe more I thought about it, I don\u0027t think the test_instance_build_timeout test case is really adding anything that isn\u0027t already covered in test_instance_build_timeout_mixed_instances.  test_instance_build_timeout_mixed_instances is actually a better test since it covers a couple of scenarios in one test.\n\nSo I\u0027d actually propose that we just drop the test_instance_build_timeout test case altogether.","commit_id":"de460045a66ee1300aff305719eefba5be46aca1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"94f92c41ed967516e2365c1b8af6f7b0850435a1","unresolved":false,"context_lines":[{"line_number":5207,"context_line":"        self.assertFalse(called[\u0027get_all\u0027])"},{"line_number":5208,"context_line":"        self.assertEqual(called[\u0027set_error_state\u0027], 0)"},{"line_number":5209,"context_line":""},{"line_number":5210,"context_line":"    def test_instance_build_timeout(self):"},{"line_number":5211,"context_line":"        self.flags(instance_build_timeout\u003d30)"},{"line_number":5212,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":5213,"context_line":"        created_at \u003d timeutils.utcnow() + datetime.timedelta(seconds\u003d-60)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FRaM%3D","line":5210,"in_reply_to":"AAAATH%2F%2FSTY%3D","updated":"2013-10-18 16:16:03.000000000","message":"By the way, looks like both test cases were added in the same commit so it\u0027s not like they were added for handling different cases:\n\nhttps://github.com/openstack/nova/commit/7b75fe7f571dd95287307f9d1138fb476a6bf721\n\nSo I think I\u0027m going to just remove test_instance_build_timeout since it\u0027s covered in test_instance_build_timeout_mixed_instances.","commit_id":"de460045a66ee1300aff305719eefba5be46aca1"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ae25dd53fc4b3b386d32e121b297cfe1bb9251a2","unresolved":false,"context_lines":[{"line_number":5173,"context_line":"        for uuid, status in expected_migration_status.iteritems():"},{"line_number":5174,"context_line":"            self.assertEqual(status, fetch_instance_migration_status(uuid))"},{"line_number":5175,"context_line":""},{"line_number":5176,"context_line":"    def test_instance_build_timeout_disabled(self):"},{"line_number":5177,"context_line":"        # Tests that no instances are set to error state when there is no"},{"line_number":5178,"context_line":"        # instance_build_timeout configured."},{"line_number":5179,"context_line":"        self.flags(instance_build_timeout\u003d0)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2F5B4%3D","line":5176,"updated":"2013-10-25 16:15:09.000000000","message":"(NIT): any reason why not to use doc strings? I checked a few places in this module and it seems to be mixed; \n\nhttps://github.com/openstack/nova/blob/master/nova/tests/compute/test_compute.py#L1259\n\nhttps://github.com/openstack/nova/blob/master/nova/tests/compute/test_compute.py#L1293\n\nfor example. If using \u0027#\u0027 to comment the description of the test case is the standard then I\u0027m just fine with this. Just noticed it and thought I\u0027d comment.","commit_id":"340414425d7dbdd7500ddec3e39e5853a730ca0f"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"8bd945b376ef15a3cae06cb4c19aab80eb386e63","unresolved":false,"context_lines":[{"line_number":5173,"context_line":"        for uuid, status in expected_migration_status.iteritems():"},{"line_number":5174,"context_line":"            self.assertEqual(status, fetch_instance_migration_status(uuid))"},{"line_number":5175,"context_line":""},{"line_number":5176,"context_line":"    def test_instance_build_timeout_disabled(self):"},{"line_number":5177,"context_line":"        # Tests that no instances are set to error state when there is no"},{"line_number":5178,"context_line":"        # instance_build_timeout configured."},{"line_number":5179,"context_line":"        self.flags(instance_build_timeout\u003d0)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FYDI%3D","line":5176,"in_reply_to":"AAAATn%2F%2F4%2Fk%3D","updated":"2013-11-07 22:18:26.000000000","message":"+1!","commit_id":"340414425d7dbdd7500ddec3e39e5853a730ca0f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0acc7c806c1c755d2b2a8f9997dd4cb41584905c","unresolved":false,"context_lines":[{"line_number":5173,"context_line":"        for uuid, status in expected_migration_status.iteritems():"},{"line_number":5174,"context_line":"            self.assertEqual(status, fetch_instance_migration_status(uuid))"},{"line_number":5175,"context_line":""},{"line_number":5176,"context_line":"    def test_instance_build_timeout_disabled(self):"},{"line_number":5177,"context_line":"        # Tests that no instances are set to error state when there is no"},{"line_number":5178,"context_line":"        # instance_build_timeout configured."},{"line_number":5179,"context_line":"        self.flags(instance_build_timeout\u003d0)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2F4%2Fk%3D","line":5176,"in_reply_to":"AAAATn%2F%2F5B4%3D","updated":"2013-10-25 16:21:57.000000000","message":"It was pointed out to me by a few people, sdague one of them, that we shouldn\u0027t use doc strings in test cases because if they fail it goofs up the log and it makes it harder to debug the failure.  There should really probably be a hacking / flake8 check for that...","commit_id":"340414425d7dbdd7500ddec3e39e5853a730ca0f"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"2483b0e53a5ced3e6ed958bef21029b5aedc6abe","unresolved":false,"context_lines":[{"line_number":5173,"context_line":"        for uuid, status in expected_migration_status.iteritems():"},{"line_number":5174,"context_line":"            self.assertEqual(status, fetch_instance_migration_status(uuid))"},{"line_number":5175,"context_line":""},{"line_number":5176,"context_line":"    def test_instance_build_timeout_disabled(self):"},{"line_number":5177,"context_line":"        # Tests that no instances are set to error state when there is no"},{"line_number":5178,"context_line":"        # instance_build_timeout configured."},{"line_number":5179,"context_line":"        self.flags(instance_build_timeout\u003d0)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FNrQ%3D","line":5176,"in_reply_to":"AAAATn%2F%2FVak%3D","updated":"2013-11-12 19:27:58.000000000","message":"Cool good to know what the right way it.","commit_id":"340414425d7dbdd7500ddec3e39e5853a730ca0f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"47cd7577ccf65a15a9b5cb747e564798a4814968","unresolved":false,"context_lines":[{"line_number":5173,"context_line":"        for uuid, status in expected_migration_status.iteritems():"},{"line_number":5174,"context_line":"            self.assertEqual(status, fetch_instance_migration_status(uuid))"},{"line_number":5175,"context_line":""},{"line_number":5176,"context_line":"    def test_instance_build_timeout_disabled(self):"},{"line_number":5177,"context_line":"        # Tests that no instances are set to error state when there is no"},{"line_number":5178,"context_line":"        # instance_build_timeout configured."},{"line_number":5179,"context_line":"        self.flags(instance_build_timeout\u003d0)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FVak%3D","line":5176,"in_reply_to":"AAAATn%2F%2FYDI%3D","updated":"2013-11-09 19:21:11.000000000","message":"I opened hacking bug 1249612 for this.","commit_id":"340414425d7dbdd7500ddec3e39e5853a730ca0f"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ae25dd53fc4b3b386d32e121b297cfe1bb9251a2","unresolved":false,"context_lines":[{"line_number":5198,"context_line":"            # check our assertions"},{"line_number":5199,"context_line":"            self.assertEqual(0, len(instance_get_all_by_filters.mock_calls))"},{"line_number":5200,"context_line":""},{"line_number":5201,"context_line":"    def test_instance_build_timeout_mixed_instances(self):"},{"line_number":5202,"context_line":"        # Tests that instances which failed to build within the configured"},{"line_number":5203,"context_line":"        # instance_build_timeout value are set to error state."},{"line_number":5204,"context_line":"        self.flags(instance_build_timeout\u003d30)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2F5Bc%3D","line":5201,"updated":"2013-10-25 16:15:09.000000000","message":"Same comment here as above.","commit_id":"340414425d7dbdd7500ddec3e39e5853a730ca0f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0acc7c806c1c755d2b2a8f9997dd4cb41584905c","unresolved":false,"context_lines":[{"line_number":5198,"context_line":"            # check our assertions"},{"line_number":5199,"context_line":"            self.assertEqual(0, len(instance_get_all_by_filters.mock_calls))"},{"line_number":5200,"context_line":""},{"line_number":5201,"context_line":"    def test_instance_build_timeout_mixed_instances(self):"},{"line_number":5202,"context_line":"        # Tests that instances which failed to build within the configured"},{"line_number":5203,"context_line":"        # instance_build_timeout value are set to error state."},{"line_number":5204,"context_line":"        self.flags(instance_build_timeout\u003d30)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2F4%2Fg%3D","line":5201,"in_reply_to":"AAAATn%2F%2F5Bc%3D","updated":"2013-10-25 16:21:57.000000000","message":"Ditto.","commit_id":"340414425d7dbdd7500ddec3e39e5853a730ca0f"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"8bd945b376ef15a3cae06cb4c19aab80eb386e63","unresolved":false,"context_lines":[{"line_number":5247,"context_line":"            instance_get_all_by_filters.assert_called_once_with("},{"line_number":5248,"context_line":"                                            ctxt, filters, columns_to_join\u003d[])"},{"line_number":5249,"context_line":"            self.assertEqual(len(old_instances),"},{"line_number":5250,"context_line":"                             len(conductor_instance_update.mock_calls))"},{"line_number":5251,"context_line":"            self.assertEqual(len(old_instances),"},{"line_number":5252,"context_line":"                             len(node_is_available.mock_calls))"},{"line_number":5253,"context_line":"            for inst in old_instances:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FYC4%3D","line":5250,"updated":"2013-11-07 22:18:26.000000000","message":"You might like HasLength here - it fails with more detail:\n\n self.assertThat(\n     conductor_instance_update.mock_calls, HasLength(len(old_instances))\n\nHasLength is from testtools.matchers:\n\n from testtools.matchers import HasLength #noqa","commit_id":"340414425d7dbdd7500ddec3e39e5853a730ca0f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"47cd7577ccf65a15a9b5cb747e564798a4814968","unresolved":false,"context_lines":[{"line_number":5247,"context_line":"            instance_get_all_by_filters.assert_called_once_with("},{"line_number":5248,"context_line":"                                            ctxt, filters, columns_to_join\u003d[])"},{"line_number":5249,"context_line":"            self.assertEqual(len(old_instances),"},{"line_number":5250,"context_line":"                             len(conductor_instance_update.mock_calls))"},{"line_number":5251,"context_line":"            self.assertEqual(len(old_instances),"},{"line_number":5252,"context_line":"                             len(node_is_available.mock_calls))"},{"line_number":5253,"context_line":"            for inst in old_instances:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FVaU%3D","line":5250,"in_reply_to":"AAAATn%2F%2FYC4%3D","updated":"2013-11-09 19:21:11.000000000","message":"Done","commit_id":"340414425d7dbdd7500ddec3e39e5853a730ca0f"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"8678878d98850ac97c4bc14572c72f162407f2a0","unresolved":false,"context_lines":[{"line_number":25,"context_line":"import datetime"},{"line_number":26,"context_line":"import operator"},{"line_number":27,"context_line":"import sys"},{"line_number":28,"context_line":"import testtools"},{"line_number":29,"context_line":"import time"},{"line_number":30,"context_line":"import traceback"},{"line_number":31,"context_line":"import uuid"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2FNxI%3D","line":28,"updated":"2013-11-12 18:57:26.000000000","message":"This isn\u0027t introduced by your patch but I just noticed it\u0027s wrong: testtools should be in the third party section below.","commit_id":"84f6680995f47372ed1fe3d9d0527ae703d2bfca"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"4b51dea855b3717f12b787b10528ad70d496c0ef","unresolved":false,"context_lines":[{"line_number":33,"context_line":"import mock"},{"line_number":34,"context_line":"import mox"},{"line_number":35,"context_line":"from oslo.config import cfg"},{"line_number":36,"context_line":"from testtools.matchers import HasLength    # noqa"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"import nova"},{"line_number":39,"context_line":"from nova import availability_zones"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2BAC8%3D","line":36,"updated":"2013-12-03 16:18:59.000000000","message":"Why would you do this? Just use it through testtools or import it like\n\nfrom testools import matchers as testools_matchers\n\nreally no need for this.","commit_id":"84f6680995f47372ed1fe3d9d0527ae703d2bfca"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c24f5f7e3bfa1f9f73b06b8864684fd39f756339","unresolved":false,"context_lines":[{"line_number":33,"context_line":"import mock"},{"line_number":34,"context_line":"import mox"},{"line_number":35,"context_line":"from oslo.config import cfg"},{"line_number":36,"context_line":"from testtools.matchers import HasLength    # noqa"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"import nova"},{"line_number":39,"context_line":"from nova import availability_zones"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F9%2F74%3D","line":36,"in_reply_to":"AAAATn%2F%2BAC8%3D","updated":"2013-12-03 16:31:07.000000000","message":"I\u0027m going to blame lifeless :). I\u0027ll change to your suggestion.","commit_id":"84f6680995f47372ed1fe3d9d0527ae703d2bfca"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"4b51dea855b3717f12b787b10528ad70d496c0ef","unresolved":false,"context_lines":[{"line_number":5152,"context_line":"        # creating mocks"},{"line_number":5153,"context_line":"        with mock.patch.object(self.compute.conductor_api,"},{"line_number":5154,"context_line":"                               \u0027instance_get_all_by_filters\u0027,"},{"line_number":5155,"context_line":"                               return_value\u003dinstances[:]) as ("},{"line_number":5156,"context_line":"            instance_get_all_by_filters"},{"line_number":5157,"context_line":"        ):"},{"line_number":5158,"context_line":"            # run the code"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2BAFk%3D","line":5155,"updated":"2013-12-03 16:18:59.000000000","message":"I\u0027m fine with [:] but copy.copy is more clear imho","commit_id":"84f6680995f47372ed1fe3d9d0527ae703d2bfca"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c24f5f7e3bfa1f9f73b06b8864684fd39f756339","unresolved":false,"context_lines":[{"line_number":5152,"context_line":"        # creating mocks"},{"line_number":5153,"context_line":"        with mock.patch.object(self.compute.conductor_api,"},{"line_number":5154,"context_line":"                               \u0027instance_get_all_by_filters\u0027,"},{"line_number":5155,"context_line":"                               return_value\u003dinstances[:]) as ("},{"line_number":5156,"context_line":"            instance_get_all_by_filters"},{"line_number":5157,"context_line":"        ):"},{"line_number":5158,"context_line":"            # run the code"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F9%2F7s%3D","line":5155,"in_reply_to":"AAAATn%2F%2BAFk%3D","updated":"2013-12-03 16:31:07.000000000","message":"I\u0027ll use list() to be consistent with the below copy.","commit_id":"84f6680995f47372ed1fe3d9d0527ae703d2bfca"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0443a4b37c8af325ef5dcc14990a91efafe879d1","unresolved":false,"context_lines":[{"line_number":5152,"context_line":"        # creating mocks"},{"line_number":5153,"context_line":"        with mock.patch.object(self.compute.conductor_api,"},{"line_number":5154,"context_line":"                               \u0027instance_get_all_by_filters\u0027,"},{"line_number":5155,"context_line":"                               return_value\u003dinstances[:]) as ("},{"line_number":5156,"context_line":"            instance_get_all_by_filters"},{"line_number":5157,"context_line":"        ):"},{"line_number":5158,"context_line":"            # run the code"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F9%2F4s%3D","line":5155,"in_reply_to":"AAAATn%2F9%2F7s%3D","updated":"2013-12-03 16:43:17.000000000","message":"Actually I don\u0027t even think the shallow copy is necessary here, I did it because that\u0027s what the original test was doing in it\u0027s stub method, but that seems unnecessary.","commit_id":"84f6680995f47372ed1fe3d9d0527ae703d2bfca"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0443a4b37c8af325ef5dcc14990a91efafe879d1","unresolved":false,"context_lines":[{"line_number":5158,"context_line":"            # run the code"},{"line_number":5159,"context_line":"            self.compute._check_instance_build_time(ctxt)"},{"line_number":5160,"context_line":"            # check our assertions"},{"line_number":5161,"context_line":"            self.assertEqual(0, len(instance_get_all_by_filters.mock_calls))"},{"line_number":5162,"context_line":""},{"line_number":5163,"context_line":"    def test_instance_build_timeout_mixed_instances(self):"},{"line_number":5164,"context_line":"        # Tests that instances which failed to build within the configured"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F9%2F4U%3D","line":5161,"updated":"2013-12-03 16:43:17.000000000","message":"Guess I could use HasLength here too.","commit_id":"84f6680995f47372ed1fe3d9d0527ae703d2bfca"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"4b51dea855b3717f12b787b10528ad70d496c0ef","unresolved":false,"context_lines":[{"line_number":5176,"context_line":"            old_instances.append(instance)"},{"line_number":5177,"context_line":""},{"line_number":5178,"context_line":"        #not expired"},{"line_number":5179,"context_line":"        instances \u003d list(old_instances)  # copy the contents of old_instances"},{"line_number":5180,"context_line":"        new_instance \u003d {"},{"line_number":5181,"context_line":"            \u0027uuid\u0027: str(uuid.uuid4()),"},{"line_number":5182,"context_line":"            \u0027created_at\u0027: timeutils.utcnow(),"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2BACo%3D","line":5179,"updated":"2013-12-03 16:18:59.000000000","message":"same like with [:] above - it\u0027s odd that you use these two different methods to copy the list in the same patch :)","commit_id":"84f6680995f47372ed1fe3d9d0527ae703d2bfca"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c24f5f7e3bfa1f9f73b06b8864684fd39f756339","unresolved":false,"context_lines":[{"line_number":5176,"context_line":"            old_instances.append(instance)"},{"line_number":5177,"context_line":""},{"line_number":5178,"context_line":"        #not expired"},{"line_number":5179,"context_line":"        instances \u003d list(old_instances)  # copy the contents of old_instances"},{"line_number":5180,"context_line":"        new_instance \u003d {"},{"line_number":5181,"context_line":"            \u0027uuid\u0027: str(uuid.uuid4()),"},{"line_number":5182,"context_line":"            \u0027created_at\u0027: timeutils.utcnow(),"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F9%2F7c%3D","line":5179,"in_reply_to":"AAAATn%2F%2BACo%3D","updated":"2013-12-03 16:31:07.000000000","message":"Gonna keep this one.","commit_id":"84f6680995f47372ed1fe3d9d0527ae703d2bfca"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0443a4b37c8af325ef5dcc14990a91efafe879d1","unresolved":false,"context_lines":[{"line_number":5193,"context_line":"        with contextlib.nested("},{"line_number":5194,"context_line":"            mock.patch.object(self.compute.conductor_api,"},{"line_number":5195,"context_line":"                              \u0027instance_get_all_by_filters\u0027,"},{"line_number":5196,"context_line":"                              return_value\u003dinstances[:]),"},{"line_number":5197,"context_line":"            mock.patch.object(self.compute.conductor_api, \u0027instance_update\u0027,"},{"line_number":5198,"context_line":"                              return_value\u003dfake_instance_ref),"},{"line_number":5199,"context_line":"            mock.patch.object(self.compute.driver, \u0027node_is_available\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F9%2F4E%3D","line":5196,"updated":"2013-12-03 16:43:17.000000000","message":"This copy is probably also not necessary.","commit_id":"84f6680995f47372ed1fe3d9d0527ae703d2bfca"}]}
