Skip to content

Commit 883ce03

Browse files
authored
Refs #34488 -- Made test files path resolution independent of current working directory in ClearableFileInput selenium tests.
1 parent a79c411 commit 883ce03

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/admin_widgets/tests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import zoneinfo
55
from datetime import datetime, timedelta
66
from importlib import import_module
7+
from pathlib import Path
78
from unittest import skipUnless
89

910
from django import forms
@@ -1908,7 +1909,7 @@ def test_ForeignKey_using_to_field(self):
19081909
class ImageFieldWidgetsSeleniumTests(AdminWidgetSeleniumTestCase):
19091910
name_input_id = "id_name"
19101911
photo_input_id = "id_photo"
1911-
tests_files_folder = "%s/files" % os.getcwd()
1912+
tests_files_folder = "%s/files" % Path(__file__).parent.parent
19121913
clear_checkbox_id = "photo-clear_id"
19131914

19141915
def _submit_and_wait(self):

0 commit comments

Comments
 (0)