Move names test to pytest

This commit is contained in:
Joseph Schorr 2018-07-18 11:10:44 -04:00
parent 4ed64b0956
commit 8be5c66e14
2 changed files with 14 additions and 20 deletions

14
util/test/test_names.py Normal file
View file

@ -0,0 +1,14 @@
import pytest
from util.names import escape_tag
@pytest.mark.parametrize('input_tag, expected', [
('latest', 'latest'),
('latest124', 'latest124'),
('5de1e98d', '5de1e98d'),
('detailed_view#61', 'detailed_view_61'),
('-detailed_view#61', '_detailed_view_61')
])
def test_escape_tag(input_tag, expected):
assert escape_tag(input_tag) == expected