@@ -12,6 +12,13 @@ def test_http_with_port(self):
12
12
and parse .org == "the_org"
13
13
and parse .repo == "the_repo" )
14
14
15
+ def test_http_with_port_no_git (self ):
16
+ parse = CloneUrlParser ("unknown" , "http://the_host:7990/scm/the_org/the_repo" )
17
+ self .assertTrue (parse .scheme is None
18
+ and parse .creds is None
19
+ and parse .org == "the_org"
20
+ and parse .repo == "the_repo" )
21
+
15
22
class TestCloneUrlBitBucket (unittest .TestCase ):
16
23
17
24
def test_canary (self ):
@@ -24,6 +31,13 @@ def test_http_with_port(self):
24
31
and parse .org == "the_org"
25
32
and parse .repo == "the_repo" )
26
33
34
+ def test_http_with_port_no_git (self ):
35
+ parse = CloneUrlParser ("bitbucket" , "http://the_host:7990/scm/the_org/the_repo" )
36
+ self .assertTrue (parse .scheme == "http"
37
+ and parse .creds is None
38
+ and parse .org == "the_org"
39
+ and parse .repo == "the_repo" )
40
+
27
41
def test_https_with_port (self ):
28
42
parse = CloneUrlParser ("bitbucket" , "https://the_host:7990/scm/the_org/the_repo.git" )
29
43
self .assertTrue (parse .scheme == "https"
@@ -45,13 +59,6 @@ def test_https_url_rewirte(self):
45
59
and parse .org == "the_org"
46
60
and parse .repo == "the_repo" )
47
61
48
- def test_https_malformed (self ):
49
- parse = CloneUrlParser ("bitbucket" , "https://the_host/some/other/endpoint/scm/the_org/the_repo" )
50
- self .assertTrue (parse .scheme is None
51
- and parse .creds is None
52
- and parse .org is None
53
- and parse .repo is None )
54
-
55
62
def test_ssh_with_port (self ):
56
63
parse = CloneUrlParser ("bitbucket" , "ssh://the_user@the_host:7999/the_org/the_repo.git" )
57
64
self .assertTrue (parse .scheme == "ssh"
@@ -72,6 +79,13 @@ def test_http_with_port(self):
72
79
and parse .org == "the_org"
73
80
and parse .repo == "the_repo" )
74
81
82
+ def test_http_with_port_add_git (self ):
83
+ parse = CloneUrlParser ("azure" , "http://the_server:8080/tfs/the_org/the_project/_git/the_repo.git" )
84
+ self .assertTrue (parse .scheme == "http"
85
+ and parse .creds is None
86
+ and parse .org == "the_org"
87
+ and parse .repo == "the_repo" )
88
+
75
89
def test_https_with_port (self ):
76
90
parse = CloneUrlParser ("azure" , "https://someone@the_server:8080/tfs/the_org/the_project/_git/the_repo" )
77
91
self .assertTrue (parse .scheme == "https"
0 commit comments