)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"6ee45c9ebaf2e34d57e4f01b6f2f373b2c307d3a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"e346fbdc_0b0ef1f6","updated":"2021-11-19 21:26:40.000000000","message":"humm, this work on oslo.policy 3.10 but not on older version. to have oslo.polocy 3.10 in constraint wait for this test to fix.\n\nI think we need to make warning text assert in the way that both version work and we can proceed next.","commit_id":"a0436a58aa3af4fb36affc6d4e0bdecdd7cc011d"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"fa995b70253e6de2e63313678990a104e02a4652","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"0eb7ff4f_a01e20f9","updated":"2021-11-19 23:32:59.000000000","message":"fix for doc job - https://review.opendev.org/c/openstack/keystone/+/818652","commit_id":"fb1f75e6225751aae87ab8f7f120acd751b007cc"}],"keystone/tests/unit/test_policy.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"29caa9eca5bca2a1cf24ce19cf04f5159d88b708","unresolved":true,"context_lines":[{"line_number":160,"context_line":"            policy.enforce(self.credentials, self.action, self.target)"},{"line_number":161,"context_line":"            mock_warn.assert_called_once()"},{"line_number":162,"context_line":"            warn_msg \u003d mock_warn.call_args[0][0]"},{"line_number":163,"context_line":"            self.assertIn(expected_msg, warn_msg)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"class PolicyJsonTestCase(unit.TestCase):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5b9c40fe_7f0e7826","line":163,"range":{"start_line":163,"start_character":17,"end_line":163,"end_character":25},"updated":"2021-11-29 14:45:08.000000000","message":"How come we can\u0027t keep the policy name in the expected string?","commit_id":"1154b5fd3cc417d966ab90406507efecfd00626b"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"e74fcbeeafba8bc1b3b5cda0053fc743c179ab97","unresolved":true,"context_lines":[{"line_number":160,"context_line":"            policy.enforce(self.credentials, self.action, self.target)"},{"line_number":161,"context_line":"            mock_warn.assert_called_once()"},{"line_number":162,"context_line":"            warn_msg \u003d mock_warn.call_args[0][0]"},{"line_number":163,"context_line":"            self.assertIn(expected_msg, warn_msg)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"class PolicyJsonTestCase(unit.TestCase):"}],"source_content_type":"text/x-python","patch_set":3,"id":"ad797d1a_fa009fe6","line":163,"range":{"start_line":163,"start_character":17,"end_line":163,"end_character":25},"in_reply_to":"5b9c40fe_7f0e7826","updated":"2021-11-29 15:39:47.000000000","message":"it does but additional to check_str also.\n\nPrevious: it added only policy name(that is why expected_msg  @ L154 passing) - foo \nNow: it adds policy name and check-str in warning so in this test case it will be - \"foo\": \"\"\n\nso expected message will be like:\n\n        expected_msg \u003d (\n            \u0027Policy \"foo\": \"\" failed scope check. The token used to make the \u0027\n            \u0027request was project scoped but the policy requires [\\\u0027system\\\u0027] \u0027\n            \u0027scope. This behavior may change in the future where using the \u0027\n            \u0027intended scope is required\u0027\n        )\n\nyou can see the failure here https://bacfa3e13b0e097fa4b5-bb16683249f908fc1002d6892692fd50.ssl.cf5.rackcdn.com/815820/1/check/cross-keystone-py38/f340237/testr_results.html\n\nI can add assert_called_with and modify the expected message or another assert to check policy name in message, what ever you prefer ?","commit_id":"1154b5fd3cc417d966ab90406507efecfd00626b"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"bf435c70348d4378a0bb933a9a4cf8184013fac4","unresolved":true,"context_lines":[{"line_number":160,"context_line":"            policy.enforce(self.credentials, self.action, self.target)"},{"line_number":161,"context_line":"            mock_warn.assert_called_once()"},{"line_number":162,"context_line":"            warn_msg \u003d mock_warn.call_args[0][0]"},{"line_number":163,"context_line":"            self.assertIn(expected_msg, warn_msg)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"class PolicyJsonTestCase(unit.TestCase):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9827fb44_a5cb76c2","line":163,"range":{"start_line":163,"start_character":17,"end_line":163,"end_character":25},"in_reply_to":"96edc4c1_09647800","updated":"2021-11-29 15:58:23.000000000","message":"ohk, now i remember. so new expected_msg I mentioned in my comment work on oslo.policy 3.10 but does not work on \u003c3.10 and existing expected_msg otherway around that i why I did assertIn.  What we can do, once https://review.opendev.org/c/openstack/requirements/+/815820 is merged than we can bump the oslo.policy version in keystone requirements.txt and update this explicit msg.\n\nOR leave it like done in this patch so that it works on oslo.policy 3.10 and \u003c3.10","commit_id":"1154b5fd3cc417d966ab90406507efecfd00626b"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"3a69b9e36601487f2fa2f96d8671c7fcc419e5a5","unresolved":true,"context_lines":[{"line_number":160,"context_line":"            policy.enforce(self.credentials, self.action, self.target)"},{"line_number":161,"context_line":"            mock_warn.assert_called_once()"},{"line_number":162,"context_line":"            warn_msg \u003d mock_warn.call_args[0][0]"},{"line_number":163,"context_line":"            self.assertIn(expected_msg, warn_msg)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"class PolicyJsonTestCase(unit.TestCase):"}],"source_content_type":"text/x-python","patch_set":3,"id":"152839c5_9ab843d6","line":163,"range":{"start_line":163,"start_character":17,"end_line":163,"end_character":25},"in_reply_to":"9827fb44_a5cb76c2","updated":"2021-11-30 19:09:30.000000000","message":"done in https://review.opendev.org/c/openstack/keystone/+/819916","commit_id":"1154b5fd3cc417d966ab90406507efecfd00626b"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"d857057f7ed3b8675b028978bbbff204097ec87c","unresolved":true,"context_lines":[{"line_number":160,"context_line":"            policy.enforce(self.credentials, self.action, self.target)"},{"line_number":161,"context_line":"            mock_warn.assert_called_once()"},{"line_number":162,"context_line":"            warn_msg \u003d mock_warn.call_args[0][0]"},{"line_number":163,"context_line":"            self.assertIn(expected_msg, warn_msg)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"class PolicyJsonTestCase(unit.TestCase):"}],"source_content_type":"text/x-python","patch_set":3,"id":"96edc4c1_09647800","line":163,"range":{"start_line":163,"start_character":17,"end_line":163,"end_character":25},"in_reply_to":"ad797d1a_fa009fe6","updated":"2021-11-29 15:41:46.000000000","message":"Yeah - that sounds good. I prefer the expected message to be explicit so we can make sure we\u0027re asserting what we expect (something else isn\u0027t invoking the assertion unintentionally).","commit_id":"1154b5fd3cc417d966ab90406507efecfd00626b"}]}
