diff options
author | Tommi Virtanen <tv@eagain.net> | 2007-06-05 14:06:33 +0300 |
---|---|---|
committer | Tommi Virtanen <tv@eagain.net> | 2007-06-05 14:06:33 +0300 |
commit | 4f6a8b8770e7aee232a3c88bf00c3ccce6378b62 (patch) | |
tree | 51c7dffde1d0c10d7b8ff1dc611bf2a8699d6c02 /gitosis/test | |
parent | Extract test utility functions. (diff) | |
download | gitosis-dakkar-4f6a8b8770e7aee232a3c88bf00c3ccce6378b62.tar.gz gitosis-dakkar-4f6a8b8770e7aee232a3c88bf00c3ccce6378b62.tar.bz2 gitosis-dakkar-4f6a8b8770e7aee232a3c88bf00c3ccce6378b62.zip |
Add .git to gitweb projects list if only that version of path exists.
Diffstat (limited to 'gitosis/test')
-rw-r--r-- | gitosis/test/test_gitweb.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gitosis/test/test_gitweb.py b/gitosis/test/test_gitweb.py index 0840879..e634d42 100644 --- a/gitosis/test/test_gitweb.py +++ b/gitosis/test/test_gitweb.py @@ -1,9 +1,11 @@ from nose.tools import eq_ as eq +import os from ConfigParser import RawConfigParser from cStringIO import StringIO from gitosis import gitweb +from gitosis.test.util import mkdir, maketemp def test_projectsList_empty(): cfg = RawConfigParser() @@ -86,3 +88,20 @@ def test_projectsList_multiple_globalGitwebYes(): quux foo%2Fbar John+Doe ''') + +def test_projectsList_reallyEndsWithGit(): + tmp = maketemp() + path = os.path.join(tmp, 'foo.git') + mkdir(path) + cfg = RawConfigParser() + cfg.add_section('gitosis') + cfg.set('gitosis', 'repositories', tmp) + cfg.add_section('repo foo') + cfg.set('repo foo', 'gitweb', 'yes') + got = StringIO() + gitweb.generate( + config=cfg, + fp=got) + eq(got.getvalue(), '''\ +foo.git +''') |