1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-10-18 09:00:07 +00:00

test: expand unit test coverage across admin, accounts, vrtManager, logs, appsettings, and datasource

This commit is contained in:
catborise 2026-09-25 11:26:53 +03:00
parent 933e7b378a
commit c31ed28042
8 changed files with 442 additions and 25 deletions

View file

@ -2,11 +2,15 @@ import sys
import unittest
from unittest.mock import MagicMock
# Mock django if not installed so tests can run in minimal/standalone environments
if "django" not in sys.modules:
try:
from django.conf import settings
if not settings.configured:
settings.configure(MAC_OUI="52:54:10")
except ImportError:
django_mock = MagicMock()
django_mock.conf.settings.MAC_OUI = "52:54:10"
sys.modules["django"] = django_mock
sys.modules["django.conf"] = django_mock
sys.modules["django.conf"] = django_mock.conf
from vrtManager.network import network_size, wvmNetwork