aboutsummaryrefslogtreecommitdiff
path: root/gitosis/test/test_access.py
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2008-10-28 03:37:28 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2008-10-28 03:37:28 -0700
commitf275a5f74bd00efa5a9b4b80826d18c9d7442ff9 (patch)
treed4b1b029f2ad1632bd64162a2cdf61b73c658378 /gitosis/test/test_access.py
parentFixup whitespace. (diff)
parentUse "git shell" instead of "git-shell", for compatibility with git 1.6. (diff)
downloadgitosis-dakkar-f275a5f74bd00efa5a9b4b80826d18c9d7442ff9.tar.gz
gitosis-dakkar-f275a5f74bd00efa5a9b4b80826d18c9d7442ff9.tar.bz2
gitosis-dakkar-f275a5f74bd00efa5a9b4b80826d18c9d7442ff9.zip
Merge branch 'upstream' into gentoo
Conflicts: gitosis/run_hook.py gitosis/serve.py gitosis/test/test_run_hook.py gitosis/test/test_serve.py
Diffstat (limited to 'gitosis/test/test_access.py')
-rw-r--r--gitosis/test/test_access.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/gitosis/test/test_access.py b/gitosis/test/test_access.py
index 9f9d81a..f39444c 100644
--- a/gitosis/test/test_access.py
+++ b/gitosis/test/test_access.py
@@ -1,5 +1,6 @@
from nose.tools import eq_ as eq
+import logging
from ConfigParser import RawConfigParser
from gitosis import access
@@ -78,6 +79,14 @@ def test_read_yes_map_wouldHaveWritable():
eq(access.haveAccess(config=cfg, user='jdoe', mode='readonly', path='foo/bar'),
None)
+def test_read_yes_all():
+ cfg = RawConfigParser()
+ cfg.add_section('group fooers')
+ cfg.set('group fooers', 'members', '@all')
+ cfg.set('group fooers', 'readonly', 'foo/bar')
+ eq(access.haveAccess(config=cfg, user='jdoe', mode='readonly', path='foo/bar'),
+ ('repositories', 'foo/bar'))
+
def test_base_global_absolute():
cfg = RawConfigParser()
cfg.add_section('gitosis')