Initial commit
This commit is contained in:
commit
4ff9eac274
45 files changed
+2911
No files matched your search
+13
@@ -0,0 +1,13 @@
|
||||
"""Root conftest: ensure Django is configured before any test conftest imports
|
||||
models. pytest-django normally handles this, but our tests-dir conftest imports
|
||||
plugin modules at collection time, so we force ``django.setup()`` here
|
||||
unconditionally and early.
|
||||
"""
|
||||
import os
|
||||
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "netbox.settings")
|
||||
|
||||
import django # noqa: E402
|
||||
|
||||
if not django.apps.apps.ready:
|
||||
django.setup()
|
||||
Reference in new issue
Block a user