churchyard / centos / centpkg

Forked from centos/centpkg 16 days ago
Clone
Blob Blame History Raw
import unittest

from centpkg import utils


class TestGetRepoName(unittest.TestCase):
  def test_rpms_org(self):
    assert utils.get_repo_name('rpms/time') == 'rpms/time'

  @unittest.expectedFailure
  def test_gitlab_fork(self):
    assert utils.get_repo_name('someuser/time') == 'rpms/time'

  @unittest.expectedFailure
  def test_centpkg_fork(self):
    assert utils.get_repo_name('someuser/centos_rpms_binutils') == 'rpms/binutils'

  @unittest.expectedFailure
  def test_ssh_fork(self):
    assert utils.get_repo_name('git@gitlab.com:nickc2/binutils') == 'rpms/binutils'


if __name__ == '__main__':
    unittest.main()