wrolpi/modules/videos/channel/test/test_channel.py
Roland 9b899f6fc0
A new start
Signed-off-by: Roland <roland@learningselfreliance.com>
2021-11-01 16:43:09 -06:00

21 lines
565 B
Python

import pathlib
import unittest
from modules.videos.models import Channel
from modules.videos.test.common import create_channel_structure
from wrolpi.db import get_db_session
from wrolpi.test.common import wrap_test_db
class TestChannel(unittest.TestCase):
@wrap_test_db
@create_channel_structure(
{
'Foo': ['vid1.mp4'],
}
)
def test_channel(self, tempdir):
with get_db_session() as session:
channel = session.query(Channel).one()
self.assertIsInstance(channel.directory, pathlib.Path)