mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-10 04:06:47 +00:00
test: each app keeps its tests in a tests package
131 test modules sat next to the code they test; instances alone had 51 of them beside views.py and utils.py. They move into a tests/ package per app, and the JavaScript checks into webvirtcloud/tests/js. Each non-empty tests.py becomes tests/test_views.py; the empty generated stubs are removed. Imports of the app's own modules become absolute, paths built from __file__ go one level up, the live helper is instances.tests.livetest, and coverage omits */tests/*. The suite discovers the same 960 tests as before.
This commit is contained in:
parent
0906838193
commit
c55f52f025
154 changed files with 27 additions and 39 deletions
0
vrtManager/tests/__init__.py
Normal file
0
vrtManager/tests/__init__.py
Normal file
|
|
@ -1,6 +1,6 @@
|
|||
"""Live checks of bounded connection opens against real libvirt.
|
||||
|
||||
Runs only with TEST_LIBVIRT_HOST set (a TCP compute, see instances/livetest.py);
|
||||
Runs only with TEST_LIBVIRT_HOST set (a TCP compute, see instances/tests/livetest.py);
|
||||
TEST_LIBVIRT_SSH_HOST/_LOGIN add a reachable ssh compute. 192.0.2.1 is
|
||||
TEST-NET-1: SYN packets to it are dropped, as for a host that went away
|
||||
without a trace.
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
"""Live check that the NVRAM file a migrated VM leaves behind is removed,
|
||||
and kept when the destination sees the same directory.
|
||||
|
||||
Runs only with TEST_LIBVIRT_HOST set (see instances/livetest.py). The
|
||||
Runs only with TEST_LIBVIRT_HOST set (see instances/tests/livetest.py). The
|
||||
deletion needs a second host: TEST_LIBVIRT_SSH_HOST (and _LOGIN).
|
||||
"""
|
||||
|
||||
|
|
@ -12,7 +12,7 @@ import libvirt
|
|||
from django.test import SimpleTestCase
|
||||
from lxml import etree
|
||||
|
||||
from instances import livetest
|
||||
from instances.tests import livetest
|
||||
from vrtManager.connection import CONN_SSH, NVRAM_DIR, connection_manager, wvmConnect
|
||||
|
||||
NAME = livetest.PREFIX + "nvram"
|
||||
Loading…
Add table
Add a link
Reference in a new issue