shlax/tests/test_commit.py
2020-02-13 05:42:04 +01:00

20 lines
506 B
Python

from podctl.visitors.commit import Commit
def test_name_parse():
commit = Commit('foo.ee/bar/test:y')
assert commit.registry == 'foo.ee'
assert commit.repo == 'bar/test'
assert commit.tags == ['y']
commit = Commit('foo.ee/bar/test')
assert commit.registry == 'foo.ee'
assert commit.repo == 'bar/test'
commit = Commit('bar/test')
assert commit.repo == 'bar/test'
commit = Commit('bar/test:y')
assert commit.repo == 'bar/test'
assert commit.tags == ['y']