2021-04-15 12:43:59 -03:00
|
|
|
import unittest
|
|
|
|
|
|
|
|
from centpkg import utils
|
|
|
|
|
|
|
|
|
|
|
|
class TestGetRepoName(unittest.TestCase):
|
|
|
|
def test_rpms_org(self):
|
|
|
|
assert utils.get_repo_name('rpms/time') == 'rpms/time'
|
|
|
|
|
2024-02-19 14:51:35 -08:00
|
|
|
@unittest.expectedFailure
|
2021-04-15 12:43:59 -03:00
|
|
|
def test_gitlab_fork(self):
|
|
|
|
assert utils.get_repo_name('someuser/time') == 'rpms/time'
|
|
|
|
|
2024-02-19 14:51:35 -08:00
|
|
|
@unittest.expectedFailure
|
2021-04-15 12:43:59 -03:00
|
|
|
def test_centpkg_fork(self):
|
|
|
|
assert utils.get_repo_name('someuser/centos_rpms_binutils') == 'rpms/binutils'
|
|
|
|
|
2024-02-19 14:51:35 -08:00
|
|
|
@unittest.expectedFailure
|
2021-04-15 12:43:59 -03:00
|
|
|
def test_ssh_fork(self):
|
|
|
|
assert utils.get_repo_name('git@gitlab.com:nickc2/binutils') == 'rpms/binutils'
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
unittest.main()
|