Exemplo n.º 1
0
 def test_generate_tag_list_gitok(self):
     request = Request(StubHandler())
     request_info = {'tags':'git-ok', 'branch':'test'}
     MockedSettings['git']['gitweb_servername'] = 'example.com'
     with mock.patch.dict(Settings, MockedSettings):
         gen_tags = request._generate_tag_list(request_info, 'repo')
         T.assert_equals(gen_tags[0][1], 'https://example.com/?p=repo.git;a=log;h=refs/heads/test')
Exemplo n.º 2
0
 def test_generate_tag_list_no_special(self):
     request = Request(StubHandler())
     request_info = {'tags':'git-not-ok', 'branch':'test'}
     MockedSettings['git']['gitweb_servername'] = 'example.com'
     with mock.patch.dict(Settings, MockedSettings):
         gen_tags = request._generate_tag_list(request_info, 'repo')
         T.assert_equals(gen_tags[0][1], None)
Exemplo n.º 3
0
 def test_generate_tag_list_gitok(self):
     request = Request(StubHandler())
     request_info = {'tags': 'git-ok', 'branch': 'test'}
     MockedSettings['git']['gitweb_servername'] = 'example.com'
     with mock.patch.dict(Settings, MockedSettings):
         gen_tags = request._generate_tag_list(request_info, 'repo')
         T.assert_equals(gen_tags[0][1], 'https://example.com/?p=repo.git;a=log;h=refs/heads/test')
Exemplo n.º 4
0
 def test_generate_tag_list_no_special(self):
     request = Request(StubHandler())
     request_info = {'tags': 'git-not-ok', 'branch': 'test'}
     MockedSettings['git']['gitweb_servername'] = 'example.com'
     with mock.patch.dict(Settings, MockedSettings):
         gen_tags = request._generate_tag_list(request_info, 'repo')
         T.assert_equals(gen_tags[0][1], None)
Exemplo n.º 5
0
 def test_generate_tag_list_gitok(self):
     request = Request(StubHandler())
     request_info = {"tags": "git-ok", "branch": "test"}
     MockedSettings["git"]["gitweb_servername"] = "example.com"
     with mock.patch.dict(Settings, MockedSettings):
         gen_tags = request._generate_tag_list(request_info, "repo")
         T.assert_equals(gen_tags[0][1], "https://example.com/?p=repo.git;a=log;h=refs/heads/test")
Exemplo n.º 6
0
 def test_generate_tag_list_no_special(self):
     request = Request(StubHandler())
     request_info = {"tags": "git-not-ok", "branch": "test"}
     MockedSettings["git"]["gitweb_servername"] = "example.com"
     with mock.patch.dict(Settings, MockedSettings):
         gen_tags = request._generate_tag_list(request_info, "repo")
         T.assert_equals(gen_tags[0][1], None)