mockup test files
This commit is contained in:
parent
25dcce742c
commit
d15ca98447
|
@ -1,6 +1,6 @@
|
|||
# aircox.controllers
|
||||
This module provides the following controllers classes:
|
||||
- `log_archiver.LogArchive`: dumps and load gzip archives from Log models.
|
||||
- `log_archiver.LogArchiver`: dumps and load gzip archives from Log models.
|
||||
- `sound_file.SoundFile`: handle synchronisation between filesystem and database for a sound file.
|
||||
- `sound_monitor.SoundMonitor`: monitor filesystem for changes on audio files and synchronise database.
|
||||
- `sound_stats.SoundStats` (+ `SoxStats`): get audio statistics of an audio file using Sox.
|
||||
|
|
19
aircox/tests/controllers/test_diffusions.py
Normal file
19
aircox/tests/controllers/test_diffusions.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
import pytest
|
||||
|
||||
from aircox.controllers.diffusions import Diffusions
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def diffusions():
|
||||
return Diffusions
|
||||
|
||||
|
||||
class TestDiffusion:
|
||||
def test___init__(self):
|
||||
pass
|
||||
|
||||
def test_update(self):
|
||||
pass
|
||||
|
||||
def test_clean(self):
|
||||
pass
|
37
aircox/tests/controllers/test_log_archiver.py
Normal file
37
aircox/tests/controllers/test_log_archiver.py
Normal file
|
@ -0,0 +1,37 @@
|
|||
import pytest
|
||||
|
||||
from aircox.controllers.log_archiver import LogArchiver
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def log_archiver():
|
||||
return LogArchiver()
|
||||
|
||||
|
||||
class TestLogArchiver:
|
||||
def test_get_path(self):
|
||||
pass
|
||||
|
||||
def test_archive(self):
|
||||
pass
|
||||
|
||||
def test_archive_no_qs(self):
|
||||
pass
|
||||
|
||||
def test_archive_not_keep(self):
|
||||
pass
|
||||
|
||||
def test_sort_log(self):
|
||||
pass
|
||||
|
||||
def test_serialize(self):
|
||||
pass
|
||||
|
||||
def test_load(self):
|
||||
pass
|
||||
|
||||
def test_load_file_not_exists(self):
|
||||
pass
|
||||
|
||||
def test_get_relations(self):
|
||||
pass
|
22
aircox/tests/controllers/test_playlist_import.py
Normal file
22
aircox/tests/controllers/test_playlist_import.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
import pytest
|
||||
|
||||
from aircox.controller.playlist_import import PlaylistImport
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def playlist_import():
|
||||
return PlaylistImport()
|
||||
|
||||
|
||||
class TestPlaylistImport:
|
||||
def test_reset(self):
|
||||
pass
|
||||
|
||||
def test_run(self):
|
||||
pass
|
||||
|
||||
def test_read(self):
|
||||
pass
|
||||
|
||||
def make_playlist(self):
|
||||
pass
|
|
@ -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
|
||||
|
|
47
aircox/tests/controllers/test_sound_stats.py
Normal file
47
aircox/tests/controllers/test_sound_stats.py
Normal file
|
@ -0,0 +1,47 @@
|
|||
import pytest
|
||||
|
||||
from aircox.controllers.sound_stats import SoxStats, SoundStats
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def sox_stats():
|
||||
return SoxStats()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def sound_stats():
|
||||
return SoundStats()
|
||||
|
||||
|
||||
class TestSoxStats:
|
||||
def test___init__(self):
|
||||
pass
|
||||
|
||||
def test_get(self):
|
||||
pass
|
||||
|
||||
def test_parse(self):
|
||||
pass
|
||||
|
||||
def test_analyse(self):
|
||||
pass
|
||||
|
||||
|
||||
class TestSoundStats:
|
||||
def test___init__(self):
|
||||
pass
|
||||
|
||||
def test_get_file_stats(self):
|
||||
pass
|
||||
|
||||
def test_analyze(self):
|
||||
pass
|
||||
|
||||
def test_analyze_no_sample_length(self):
|
||||
pass
|
||||
|
||||
def test_check(self):
|
||||
pass
|
||||
|
||||
def test_resume(self):
|
||||
pass
|
Loading…
Reference in New Issue
Block a user