-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_utils.py
22 lines (16 loc) · 861 Bytes
/
test_utils.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from app.utils import cleanup_job_suffix
def test_cleanup_job_suffix_accents():
input_with_accent_character = "The Panty Piñata Polarization HDTV-1080p"
expected_result = "thepantypiatapolarizationhdtv1080p"
result = cleanup_job_suffix(input_with_accent_character)
assert result == expected_result
def test_cleanup_job_suffix_period():
input_with_period_character = "The.Panty.Piata.Polarization.HDTV-1080p"
expected_result = "thepantypiatapolarizationhdtv1080p"
result = cleanup_job_suffix(input_with_period_character)
assert result == expected_result
def test_cleanup_job_suffix_underscore():
input_with_bad_character = "The_Panty_Piata_Polarization_HDTV-1080p"
expected_result = "thepantypiatapolarizationhdtv1080p"
result = cleanup_job_suffix(input_with_bad_character)
assert result == expected_result