changeset 2405:0813af0f2425

Refactor some common code into a seaparate file.
author Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl>
date Mon, 16 Jul 2007 00:57:23 +0200
parents d915ef70ebc9
children 212cd3474046
files MoinMoin/_tests/common.py
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/_tests/common.py	Mon Jul 16 00:57:23 2007 +0200
@@ -0,0 +1,14 @@
+# -*- coding: iso-8859-1 -*-
+"""
+    MoinMoin - MoinMoin.packages tests - common code
+
+    @copyright: 2007 MoinMoin:KarolNowak
+    @license: GNU GPL, see COPYING for details.
+"""
+
+def gain_superuser_rights(request):
+    request.user.name = "SuperUserName"
+    request.user.valid = 1
+    request.user.may.name = request.user.name
+    request.cfg.superuser.append(request.user.name)
+    request.user.auth_method = request.cfg.trusted_auth_methods[0]