)]}'
{"ironic/conductor/manager.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"9657319fb00ecb73527c737881a7ed6525ea2f55","unresolved":false,"context_lines":[{"line_number":242,"context_line":"            if (\u0027resource_class\u0027 in delta and task.node.resource_class"},{"line_number":243,"context_line":"                    and task.node.provision_state"},{"line_number":244,"context_line":"                    not in allowed_update_states):"},{"line_number":245,"context_line":"                action \u003d _(\"Node %(node)s can not have %(field)s \""},{"line_number":246,"context_line":"                           \"updated unless it is in one of allowed \""},{"line_number":247,"context_line":"                           \"(%(allowed)s) states.\")"},{"line_number":248,"context_line":"                raise exception.InvalidState("}],"source_content_type":"text/x-python","patch_set":2,"id":"5faad753_f65040d7","line":245,"updated":"2019-09-06 14:36:36.000000000","message":"let\u0027s replace %(fields)s with resource_class to be specific","commit_id":"e4be1d42617c615a241095450a562ca7550d67bb"}],"ironic/tests/unit/conductor/test_manager.py":[{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"4d9977dd4ebd07bce3cc86cd17b822ee91cf212e","unresolved":false,"context_lines":[{"line_number":775,"context_line":"                            \u0027unless it is in one of allowed (enroll, \u0027"},{"line_number":776,"context_line":"                            \u0027inspecting, inspect wait, manageable, available) \u0027"},{"line_number":777,"context_line":"                            \u0027states.\u0027).format(node.uuid)"},{"line_number":778,"context_line":"            self.assertEqual(expected_msg, str(exc.exc_info[1]))"},{"line_number":779,"context_line":""},{"line_number":780,"context_line":"            # verify change did not happen"},{"line_number":781,"context_line":"            res \u003d objects.Node.get_by_uuid(self.context, node[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"5faad753_b59dc75a","line":778,"updated":"2019-09-09 05:51:46.000000000","message":"comparing allowed states is a bit too specific, I\u0027d suggest we use assertRegex here, or assertRaisesRegex above.","commit_id":"b5caaeccbc684ac22b20cb4055cdd571d9a32cd1"},{"author":{"_account_id":15064,"name":"raphael.glon","email":"raphael.glon@corp.ovh.com","username":"raphael"},"change_message_id":"2134f250c55aff783f5f4097f9ec297ab0f36c5c","unresolved":false,"context_lines":[{"line_number":775,"context_line":"                            \u0027unless it is in one of allowed (enroll, \u0027"},{"line_number":776,"context_line":"                            \u0027inspecting, inspect wait, manageable, available) \u0027"},{"line_number":777,"context_line":"                            \u0027states.\u0027).format(node.uuid)"},{"line_number":778,"context_line":"            self.assertEqual(expected_msg, str(exc.exc_info[1]))"},{"line_number":779,"context_line":""},{"line_number":780,"context_line":"            # verify change did not happen"},{"line_number":781,"context_line":"            res \u003d objects.Node.get_by_uuid(self.context, node[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"5faad753_6b1e8c0d","line":778,"in_reply_to":"5faad753_b59dc75a","updated":"2019-09-09 08:25:44.000000000","message":"Done","commit_id":"b5caaeccbc684ac22b20cb4055cdd571d9a32cd1"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"9f0571761f244a859b7693d3041b385b22925f7e","unresolved":false,"context_lines":[{"line_number":775,"context_line":""},{"line_number":776,"context_line":"            expected_msg_regex \u003d \\"},{"line_number":777,"context_line":"                (r\u0027^Node {} can not have resource_class updated unless it is \u0027"},{"line_number":778,"context_line":"                 r\u0027in one of allowed \\(.*\\) states.$\u0027).format("},{"line_number":779,"context_line":"                    re.escape(node.uuid))"},{"line_number":780,"context_line":"            self.assertRegex(str(exc.exc_info[1]), expected_msg_regex)"},{"line_number":781,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_faa8cadb","line":778,"updated":"2019-09-21 14:31:50.000000000","message":"So using a regular expression shouldn\u0027t be necessary as you can construct the entire message using the data you have or you can just look inside for the contents of the message to contain part in doing a substring match. Anyway, I guess we can always refactor if the there are any issues created by pulling in regex.","commit_id":"f147d3ece9d22f087a2bb01de6103685f617e59c"}]}
