)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":35133,"name":"Jan Jasek","email":"jjasek@redhat.com","username":"janjasek"},"change_message_id":"855d7f484ad0a6a0ebc99402bfe5291c4e20514a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"7252524f_c05b5227","updated":"2023-12-05 16:51:31.000000000","message":"recheck, random failure","commit_id":"da3125d5972ba971787cff358f9912ac9f3fe474"}],"openstack_dashboard/test/selenium/integration/test_projects.py":[{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"8d39624e02b6fa1505052945f0292ab8bda74e12","unresolved":true,"context_lines":[{"line_number":46,"context_line":"            config.identity.admin_username).id,"},{"line_number":47,"context_line":"        role\u003dopenstack_admin.identity.find_role("},{"line_number":48,"context_line":"            config.identity.default_keystone_role).id"},{"line_number":49,"context_line":"    )"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def test_create_project(login, driver, project_name, openstack_admin,"}],"source_content_type":"text/x-python","patch_set":1,"id":"f3b5de39_c41b92e6","line":49,"updated":"2023-12-04 16:35:25.000000000","message":"This is a bit of a weird choice. Why make it a fixture?\nYou only use it once, it doesn\u0027t require cleanup.","commit_id":"8cca079e527538fb6411c46c75465c3fba9e18ca"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"9ae3f83a1a0de8d3b876c86d6580f7c867ab7527","unresolved":true,"context_lines":[{"line_number":46,"context_line":"            config.identity.admin_username).id,"},{"line_number":47,"context_line":"        role\u003dopenstack_admin.identity.find_role("},{"line_number":48,"context_line":"            config.identity.default_keystone_role).id"},{"line_number":49,"context_line":"    )"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def test_create_project(login, driver, project_name, openstack_admin,"}],"source_content_type":"text/x-python","patch_set":1,"id":"e9592707_2ec0a50f","line":49,"in_reply_to":"ae25f302_357cb5de","updated":"2023-12-05 12:24:12.000000000","message":"Could you make rewrite it so that this fixture represents a resource, and not an operation? Something like:\n\n```\n@pytest.fixture\ndef new_project_with_admin(new_project, openstack_admin, config):\n   \"\"\"Provides a project with the admin user as a member.\"\"\"\n   \n   openstack_admin.identity.assign_project_role_to_user(...)\n   yield new_project\n   \ndef test_add_role_to_project_member(login, driver, openstack_admin, \n                                    new_project_with_admin, config):\n   ...\n```","commit_id":"8cca079e527538fb6411c46c75465c3fba9e18ca"},{"author":{"_account_id":35133,"name":"Jan Jasek","email":"jjasek@redhat.com","username":"janjasek"},"change_message_id":"6c0690c11f4aa344c4f48840af1562b3f14b6d84","unresolved":false,"context_lines":[{"line_number":46,"context_line":"            config.identity.admin_username).id,"},{"line_number":47,"context_line":"        role\u003dopenstack_admin.identity.find_role("},{"line_number":48,"context_line":"            config.identity.default_keystone_role).id"},{"line_number":49,"context_line":"    )"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def test_create_project(login, driver, project_name, openstack_admin,"}],"source_content_type":"text/x-python","patch_set":1,"id":"02225774_c6661f39","line":49,"in_reply_to":"e9592707_2ec0a50f","updated":"2023-12-05 15:09:42.000000000","message":"Done","commit_id":"8cca079e527538fb6411c46c75465c3fba9e18ca"},{"author":{"_account_id":35133,"name":"Jan Jasek","email":"jjasek@redhat.com","username":"janjasek"},"change_message_id":"00899625806a7186ae261c0e1765cf12e940828d","unresolved":true,"context_lines":[{"line_number":46,"context_line":"            config.identity.admin_username).id,"},{"line_number":47,"context_line":"        role\u003dopenstack_admin.identity.find_role("},{"line_number":48,"context_line":"            config.identity.default_keystone_role).id"},{"line_number":49,"context_line":"    )"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def test_create_project(login, driver, project_name, openstack_admin,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ae25f302_357cb5de","line":49,"in_reply_to":"f3b5de39_c41b92e6","updated":"2023-12-04 17:21:58.000000000","message":"Yes, I use it only once yet (I am not sure if it will be needed in some another tests). But it is \"precondition\" or part of the setUp for the test. Although it does not require cleanup (not every fixture require cleanup) I do not see any reason why not to use it as a fixture, when it is not part of the test but setUp of the test.\nI like this way to separate what exactly is test (steps in test_..) and what is setUp/TearDown part (steps done by fixtures). I think that it is clearest way. Also when you get an output, it will show you on the very first line if the Error appeared in setUp, tearDown or in test. So I think that is the correct way how to use the fixtures.\n\nDo you have some specific reason why not to use it like that? Or what do you see as an advantage in using it as a common function? I see only negatives.","commit_id":"8cca079e527538fb6411c46c75465c3fba9e18ca"}]}
