-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtests.py
66 lines (61 loc) · 1.48 KB
/
tests.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import pytest
from main import Submission
@pytest.mark.parametrize(
("submission", "expected"),
[
(
Submission(
"yi4g0d",
"streamja/best-goal",
"Juventus 1-[2] Torino Belotti great goal",
"",
),
True,
),
(
Submission(
"yi4g0d",
"bongbong.com",
"Juventus 1-[2] Torino Belotti great goal",
"media",
),
True,
),
(
Submission(
"yi4g0d",
"gazzetta.it",
"Juventus Primavera [7]-2 Albinoleffe Dybala",
"",
),
False,
),
],
)
def test_is_video(submission: Submission, expected):
assert submission.is_video() is expected
@pytest.mark.parametrize(
("submission", "expected"),
[
(
Submission(
"yi4g0d",
"streamja/best-goal",
"Juventus 1-[2] Torino Belotti great goal",
"",
),
True,
),
(
Submission(
"yi4g0d",
"gazzetta.it",
"Juventus Primavera [7]-2 Albinoleffe Dybala",
"",
),
False,
),
],
)
def test_matches_wanted_teams(submission: Submission, expected):
assert submission.matches_wanted_teams() is expected