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