)]}'
{"openstack_dashboard/test/selenium/integration/test_credentials.py":[{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"c2a20e50d46761542bfa12edebee58afd2936f16","unresolved":true,"context_lines":[{"line_number":28,"context_line":"    shutil.rmtree(download_dir)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"download_dir \u003d firefox_binary.WebDriver.TEMPDIR"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"def test_download_rc_file_admin(login, driver, config, openstack_admin,"}],"source_content_type":"text/x-python","patch_set":2,"id":"156e7c2b_5cec4031","line":31,"updated":"2023-11-07 12:05:34.000000000","message":"Can you use one of pytest\u0027s fixtures for temporary directory instead of this?\n\nhttps://docs.pytest.org/en/6.2.x/tmpdir.html","commit_id":"d4e8c4cd210cefb95cf79b40872a511ecc9d8020"},{"author":{"_account_id":35133,"name":"Jan Jasek","email":"jjasek@redhat.com","username":"janjasek"},"change_message_id":"65c1f2a9ec0c9ae106cd15504ad702c1c31e5e9f","unresolved":true,"context_lines":[{"line_number":28,"context_line":"    shutil.rmtree(download_dir)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"download_dir \u003d firefox_binary.WebDriver.TEMPDIR"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"def test_download_rc_file_admin(login, driver, config, openstack_admin,"}],"source_content_type":"text/x-python","patch_set":2,"id":"c03a258a_dad047df","line":31,"in_reply_to":"156e7c2b_5cec4031","updated":"2023-11-07 12:55:57.000000000","message":"I thought about it but If I am not wrong then at that moment I have to create new Firefox profile (which hold all the preferences), tell Firefox that I want to use different folder as default download folder, then change default download folder for the profile using set_preference and then initialize new driver with specified profile (with all new preferences).\nI am taking care of clearing the directory (which is part of webdriver) at the end of every test so I think that it is not a problem and from my point of view it is a more clear solution than create another Fixture temporary folder and initialize new driver with specific profile and preferences.","commit_id":"d4e8c4cd210cefb95cf79b40872a511ecc9d8020"},{"author":{"_account_id":35133,"name":"Jan Jasek","email":"jjasek@redhat.com","username":"janjasek"},"change_message_id":"9675464087ae0de49ca8f5c93b7762ccc3ea2401","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    shutil.rmtree(download_dir)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"download_dir \u003d firefox_binary.WebDriver.TEMPDIR"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"def test_download_rc_file_admin(login, driver, config, openstack_admin,"}],"source_content_type":"text/x-python","patch_set":2,"id":"4550b422_23dd4430","line":31,"in_reply_to":"5750e8b3_f0095376","updated":"2023-11-07 14:42:11.000000000","message":"Good idea. Edited. Thanks.","commit_id":"d4e8c4cd210cefb95cf79b40872a511ecc9d8020"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"fd508cfbaa42fc8b6cbfa6cab5fff5d6dfdbc9a3","unresolved":true,"context_lines":[{"line_number":28,"context_line":"    shutil.rmtree(download_dir)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"download_dir \u003d firefox_binary.WebDriver.TEMPDIR"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"def test_download_rc_file_admin(login, driver, config, openstack_admin,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5750e8b3_f0095376","line":31,"in_reply_to":"c03a258a_dad047df","updated":"2023-11-07 13:01:48.000000000","message":"I guess we have to use what we have there.\n\nHow about something like this then?\n\n```\n@pytest.fixture\ndef download_dir(driver):\n    d \u003d firefox_binary.WebDriver.TEMPDIR\n    yield d\n    shutil.rmtree(d)\n```\n    \nThis way we don\u0027t need that global anymore, and we can later change the fixture without having to touch the tests, if we decide to do it differently.","commit_id":"d4e8c4cd210cefb95cf79b40872a511ecc9d8020"}]}
