)]}'
{"keystone/tests/unit/protection/v3/test_assignment.py":[{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"b8c3caceade07faa9ea6357f72b6a824ce8b15bf","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        assignments \u003d self._setup_test_role_assignments()"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        # this assignment is created by keystone-manage bootstrap"},{"line_number":123,"context_line":"        self.expected.append({"},{"line_number":124,"context_line":"            \u0027user_id\u0027: self.bootstrapper.admin_user_id,"},{"line_number":125,"context_line":"            \u0027project_id\u0027: self.bootstrapper.project_id,"},{"line_number":126,"context_line":"            \u0027role_id\u0027: self.bootstrapper.admin_role_id"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_59088525","line":123,"range":{"start_line":123,"start_character":8,"end_line":123,"end_character":21},"updated":"2019-03-01 11:02:23.000000000","message":"I don\u0027t understand why this is being turned into an instance variable, isn\u0027t it/shouldn\u0027t it be being reset by every test?","commit_id":"63c6e6c3974feca80a1ee278df4b18351c18d093"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"c85cd3bd32c5372ab2f51678a92985345b0c931f","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        assignments \u003d self._setup_test_role_assignments()"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        # this assignment is created by keystone-manage bootstrap"},{"line_number":123,"context_line":"        self.expected.append({"},{"line_number":124,"context_line":"            \u0027user_id\u0027: self.bootstrapper.admin_user_id,"},{"line_number":125,"context_line":"            \u0027project_id\u0027: self.bootstrapper.project_id,"},{"line_number":126,"context_line":"            \u0027role_id\u0027: self.bootstrapper.admin_role_id"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_71d23d5e","line":123,"range":{"start_line":123,"start_character":8,"end_line":123,"end_character":21},"in_reply_to":"9fdfeff1_59088525","updated":"2019-03-01 14:57:30.000000000","message":"Good question. Disclaimer, I\u0027m not sure if there is a better way to do this that is more understandable.\n\nI made this an instance variable since the expected output changes depending on two things. The authorization of the user and the request they\u0027re making. For example, a system-reader should expect to see their assignment when they list all role assignments in the deployment or if they filter for system-only roles. They shouldn\u0027t expect to see their role assignment if they\u0027re filtering by project, domain, group, or user that isn\u0027t themselves.\n\nThe instance variable is created in setup since the information about the persona we\u0027re testing is easily available there. I also felt it was better to put that there instead of in the test case directly, which I\u0027m trying to keep generic so that it can be reused across personas. Where we\u0027re using `self.expected` is when we expect the user calling the API to see their own role assignment in the result. Where we\u0027re just using `expected`, the user isn\u0027t necessarily expecting to see their own role assignment in the response.\n\nIt\u0027s a little weird and not straight forward. Do you have any ideas for making this more clear?","commit_id":"63c6e6c3974feca80a1ee278df4b18351c18d093"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"1ed5c409c30bd304c8678840b9cf9c8bba969ea2","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        assignments \u003d self._setup_test_role_assignments()"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        # this assignment is created by keystone-manage bootstrap"},{"line_number":123,"context_line":"        self.expected.append({"},{"line_number":124,"context_line":"            \u0027user_id\u0027: self.bootstrapper.admin_user_id,"},{"line_number":125,"context_line":"            \u0027project_id\u0027: self.bootstrapper.project_id,"},{"line_number":126,"context_line":"            \u0027role_id\u0027: self.bootstrapper.admin_role_id"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_2f3c49e0","line":123,"range":{"start_line":123,"start_character":8,"end_line":123,"end_character":21},"in_reply_to":"9fdfeff1_71d23d5e","updated":"2019-03-01 20:17:54.000000000","message":"Okay, I think looking through the other patches in this stack this makes a little more sense.","commit_id":"63c6e6c3974feca80a1ee278df4b18351c18d093"}]}
