Skip to content

Commit b98c962

Browse files
committed
tests: Add test coverage for GitHubPolicy
GitHubPolicy.check_permission did not yet have test coverage. Enable a few options that will at least run the code.
1 parent 94c834d commit b98c962

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

runtests.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,14 @@ def createTracEnvironment(cls, **kwargs):
165165
conf.set('repositories', 'nogh.dir', os.path.realpath('%s/.git' % NOGHGIT))
166166
conf.set('repositories', 'nogh.type', 'git')
167167

168+
# Show changed files in timeline, which will trigger the
169+
# IPermissionPolicy code paths
170+
conf.set('timeline', 'changeset_show_files', '-1')
171+
old_permission_policies = conf.get('trac', 'permission_policies')
172+
if 'GitHubPolicy' not in old_permission_policies:
173+
conf.set('trac', 'permission_policies',
174+
'GitHubPolicy, %s' % old_permission_policies)
175+
168176
with open(CONF, 'wb') as fp:
169177
conf.write(fp)
170178

0 commit comments

Comments
 (0)