Fix tests for older django
get_wrapped_view_function,
should_edit,
dangerous_execute_code,
+ orig_reload,
)
from iommi.part import render_root
from tests.helpers import req
@@ -100,6 +101,8 @@ def foo_view(request):
assert actual_new_code == orig_code.replace('foo view data', 'changed!')
# Reload trigger hack
+ if orig_reload is not None: # modern django
+
from django.utils import autoreload
autoreload.trigger_reload('notused')
captured = capsys.readouterr()
