summaryrefslogtreecommitdiff
path: root/tests/admin_widgets/tests.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2025-05-15 12:02:00 -0400
committerGitHub <noreply@github.com>2025-05-15 13:02:00 -0300
commit883ce03e43b8c6b47f3732f00f4386be789445c8 (patch)
tree7760feae610cc55ce18fb78af3b77e0970d223da /tests/admin_widgets/tests.py
parenta79c411147800a60169ea943545686cd9261cdc5 (diff)
Refs #34488 -- Made test files path resolution independent of current working directory in ClearableFileInput selenium tests.
Diffstat (limited to 'tests/admin_widgets/tests.py')
-rw-r--r--tests/admin_widgets/tests.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/admin_widgets/tests.py b/tests/admin_widgets/tests.py
index bd2dd10cc4..c5ca0cf7f0 100644
--- a/tests/admin_widgets/tests.py
+++ b/tests/admin_widgets/tests.py
@@ -4,6 +4,7 @@ import re
import zoneinfo
from datetime import datetime, timedelta
from importlib import import_module
+from pathlib import Path
from unittest import skipUnless
from django import forms
@@ -1908,7 +1909,7 @@ class RelatedFieldWidgetSeleniumTests(AdminWidgetSeleniumTestCase):
class ImageFieldWidgetsSeleniumTests(AdminWidgetSeleniumTestCase):
name_input_id = "id_name"
photo_input_id = "id_photo"
- tests_files_folder = "%s/files" % os.getcwd()
+ tests_files_folder = "%s/files" % Path(__file__).parent.parent
clear_checkbox_id = "photo-clear_id"
def _submit_and_wait(self):