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