示例#1
0
def test_url_host_can_be_only_stash():
  assert Stash._getStashHostname("https://stash/bob") == "stash"
示例#2
0
def test_url_host_cannot_be_stashattack():
  assert Stash._getStashHostname("https://stashattack") is None
示例#3
0
def test_git_host_cannot_be_stashattack():
  assert Stash._getStashHostname("git@stashattack:bob") is None
示例#4
0
def test_url_host_can_start_with_stash():
  assert Stash._getStashHostname("https://stash.yojoe.local/bob") == "stash.yojoe.local"
示例#5
0
def test_git_host_cannot_be_missing_name_of_repo():
  assert Stash._getStashHostname("git@stash") is None
示例#6
0
def test_git_host_can_be_only_stash():
  assert Stash._getStashHostname("git@stash:bob") == "stash"
示例#7
0
def test_git_host_can_start_with_stash():
  assert Stash._getStashHostname("[email protected]:bob") == "stash.yojoe.local"