d6e45e3321
there was a 500 being thrown every time there was a slash at the end of a directory while adding in a new trigger this stops that 500 from coming
15 lines
402 B
Python
15 lines
402 B
Python
import pytest
|
|
|
|
from buildtrigger.basehandler import BuildTriggerHandler
|
|
|
|
|
|
@pytest.mark.parametrize('input,output', [
|
|
("Dockerfile", True),
|
|
("server.Dockerfile", True),
|
|
(u"Dockerfile", True),
|
|
(u"server.Dockerfile", True),
|
|
("bad file name", False),
|
|
(u"bad file name", False),
|
|
])
|
|
def test_path_is_dockerfile(input, output):
|
|
assert BuildTriggerHandler.filename_is_dockerfile(input) == output
|