mockup test files

This commit is contained in:
bkfox
2023-06-21 01:37:45 +02:00
parent 25dcce742c
commit d15ca98447
7 changed files with 156 additions and 8 deletions

View File

@ -5,7 +5,7 @@ from django.utils import timezone as tz
from aircox.models import Sound
from aircox.controllers import sound_monitor
from aircox.test import Interface
from aircox.test import Interface, interface
now = tz.datetime.now()
@ -21,7 +21,6 @@ def logger():
logger = Interface(
logging, {"info": None, "debug": None, "error": None, "warning": None}
)
print("logger", logger)
return logger
@ -73,7 +72,6 @@ class TestTask:
def test_ping(self, task):
task.timestamp = None
task.ping()
print("---", task.timestamp, now)
assert task.timestamp >= now
@pytest.mark.django_db
@ -124,13 +122,38 @@ class TestModifiedTask:
datetime._imeta.release()
def test__call__(self):
pass
def test__call__(self, modified_task, event):
interface(modified_task, {"wait": None})
modified_task(event)
assert modified_task.calls["wait"]
class TestMonitorHandler:
pass
def test_monitor___init__(self):
pass
def test_on_created(self):
pass
def test_on_deleted(self):
pass
def test_on_moved(self):
pass
def test_on_modified(self):
pass
def test__submit(self):
pass
class SoundMonitor:
pass
def test_report(self):
pass
def test_scan(self):
pass
def test_monitor(self):
pass