Skip to content

Commit 2c246de

Browse files
Michael Russellguyzmo
authored andcommitted
Add test for repos using git protocol too
1 parent 131a8be commit 2c246de

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

tests/integration/test_main.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,16 +329,21 @@ def test_request_list__no_repo_slug__https(self, capsys, caplog):
329329
assert out == ' 1\tdesc1 \thttp://request/1\n 2\tdesc2 \thttp://request/2\n 3\tdesc3 \thttp://request/3\n'
330330
assert 'id' in caplog.text and 'title' in caplog.text and 'URL' in caplog.text
331331

332-
def test_request_list__no_repo_slug__https_dot_git(self, capsys, caplog):
332+
def test_request_list__no_repo_slug__https_dot_git_fix__issue55(self):
333333
from subprocess import call
334334
call(['git', 'init', '-q', self.tempdir.name])
335335
call(['git', '--git-dir={}/.git'.format(self.tempdir.name), 'remote', 'add', 'github', 'https://github.com/guyzmo/.git-repo'])
336336
repo_slug, seen_args = self.main_request_list(rc=0, args={})
337337
assert ('guyzmo', '.git-repo') == repo_slug
338338
assert dict() == seen_args
339-
out, err = capsys.readouterr()
340-
assert out == ' 1\tdesc1 \thttp://request/1\n 2\tdesc2 \thttp://request/2\n 3\tdesc3 \thttp://request/3\n'
341-
assert 'id' in caplog.text and 'title' in caplog.text and 'URL' in caplog.text
339+
340+
def test_request_list__no_repo_slug__git_dot_git_fix__issue55(self):
341+
from subprocess import call
342+
call(['git', 'init', '-q', self.tempdir.name])
343+
call(['git', '--git-dir={}/.git'.format(self.tempdir.name), 'remote', 'add', 'github', '[email protected]:guyzmo/.git-repo'])
344+
repo_slug, seen_args = self.main_request_list(rc=0, args={})
345+
assert ('guyzmo', '.git-repo') == repo_slug
346+
assert dict() == seen_args
342347

343348
def test_request_fetch__request(self, capsys, caplog):
344349
from subprocess import call

0 commit comments

Comments
 (0)