-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest_yttv.py
49 lines (34 loc) · 878 Bytes
/
test_yttv.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import pytest
from yttv import YTTV
@pytest.fixture
def yttv():
"""Returns a YTTV instance with a loaded app"""
yttv = YTTV()
yttv.load_app()
return yttv
def test_get_settings_tv_code(yttv):
yttv.load_app()
tv_code = yttv.get_settings_tv_code()
assert len(tv_code) == 12
yttv.stop_app()
def test_get_settings_tv_code_multiple_times(yttv):
yttv.load_app()
tv_code = yttv.get_settings_tv_code()
assert len(tv_code) == 12
yttv.reset_app()
tv_code = yttv.get_settings_tv_code()
assert len(tv_code) == 12
yttv.stop_app()
# TODO: Write Test
def test_install_no_script(yttv):
yttv.stop_app()
# TODO: Write Test
def test_load_app(yttv):
yttv.stop_app()
# TODO: Write Test
def test_reset_app(yttv):
yttv.reset_app()
yttv.stop_app()
# TODO: Write Test
def test_stop_app(yttv):
yttv.stop_app()