def test_get_ns_repo_exc(): url = "*****@*****.**" with pytest.raises(PackitException) as ex: get_namespace_and_repo_name(url) msg = f"Invalid URL format, can't obtain namespace and repository name: {url}" assert msg in str(ex.value)
def test_get_ns_repo(url, namespace, repo_name): assert get_namespace_and_repo_name(url) == (namespace, repo_name)