)]}'
{"nova/tests/unit/compute/test_shelve.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"8d0219dfe5bc9119ff9b21df7c75272c69d4475e","unresolved":false,"context_lines":[{"line_number":406,"context_line":"            self.assertTrue(soi.called)"},{"line_number":407,"context_line":""},{"line_number":408,"context_line":"    @mock.patch(\u0027oslo_utils.timeutils.is_older_than\u0027)"},{"line_number":409,"context_line":"    @mock.patch(\u0027oslo_utils.timeutils.parse_strtime\u0027)"},{"line_number":410,"context_line":"    def test_shelved_poll_checks_task_state_on_save(self, mock_parse,"},{"line_number":411,"context_line":"                                                    mock_older):"},{"line_number":412,"context_line":"        self.flags(shelved_offload_time\u003d1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_e122d651","line":409,"updated":"2015-11-10 17:52:16.000000000","message":"It may have been cleaner to just mock Instance.get_all_by_filters to return an instance with a task_state set.","commit_id":"b4ef9b9c7ece3570f3cd206e5c8fb02846e4cffc"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"dae0598b8d1138ca69cb2aa3a396cf3a10012418","unresolved":false,"context_lines":[{"line_number":406,"context_line":"            self.assertTrue(soi.called)"},{"line_number":407,"context_line":""},{"line_number":408,"context_line":"    @mock.patch(\u0027oslo_utils.timeutils.is_older_than\u0027)"},{"line_number":409,"context_line":"    @mock.patch(\u0027oslo_utils.timeutils.parse_strtime\u0027)"},{"line_number":410,"context_line":"    def test_shelved_poll_checks_task_state_on_save(self, mock_parse,"},{"line_number":411,"context_line":"                                                    mock_older):"},{"line_number":412,"context_line":"        self.flags(shelved_offload_time\u003d1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_44d410bc","line":409,"in_reply_to":"da85f559_01d11afa","updated":"2015-11-10 18:23:21.000000000","message":"Mainly the side effect of changing the task_state as a result of parsing the time is what I was thinking it would be nice to avoid.  If the \u0027shelved_at\u0027 key was set in sys_meta on the returned instance you wouldn\u0027t need to mock these as far as I can tell.  That just seems cleaner to me, but this works just as well.","commit_id":"b4ef9b9c7ece3570f3cd206e5c8fb02846e4cffc"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4c4dc45d6c8bb131f75d17c7fb807d627b1dfeda","unresolved":false,"context_lines":[{"line_number":406,"context_line":"            self.assertTrue(soi.called)"},{"line_number":407,"context_line":""},{"line_number":408,"context_line":"    @mock.patch(\u0027oslo_utils.timeutils.is_older_than\u0027)"},{"line_number":409,"context_line":"    @mock.patch(\u0027oslo_utils.timeutils.parse_strtime\u0027)"},{"line_number":410,"context_line":"    def test_shelved_poll_checks_task_state_on_save(self, mock_parse,"},{"line_number":411,"context_line":"                                                    mock_older):"},{"line_number":412,"context_line":"        self.flags(shelved_offload_time\u003d1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_01d11afa","line":409,"in_reply_to":"da85f559_e122d651","updated":"2015-11-10 17:57:56.000000000","message":"You mean instead of these two mocks? The code will still take the instances it gets in the list and try to parse their time strings from sysmeta, so I\u0027d still need these. Since the actual time math is tested above, I just opted to stub out those decisions.\n\nThe rest of these tests rendezvous in the database, so I was sticking with that theme.","commit_id":"b4ef9b9c7ece3570f3cd206e5c8fb02846e4cffc"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"fc73210390d09b4138305463f4b39f90372d1e38","unresolved":false,"context_lines":[{"line_number":406,"context_line":"            soi.side_effect \u003d fake_soi"},{"line_number":407,"context_line":"            self.compute._poll_shelved_instances(self.context)"},{"line_number":408,"context_line":"            self.assertTrue(soi.called)"},{"line_number":409,"context_line":"            self.assertEqual(instance2.uuid, data[0])"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"    @mock.patch(\u0027oslo_utils.timeutils.is_older_than\u0027)"},{"line_number":412,"context_line":"    @mock.patch(\u0027oslo_utils.timeutils.parse_strtime\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da85f559_877bda8b","line":409,"updated":"2015-11-10 18:30:51.000000000","message":"You should assert that len(data) is 1.  Otherwise this could pass if data was [instance2, instance1].","commit_id":"08d92ec4334463db92e720b3f51aa5d9baffe430"}]}
