diff test/test_actions.py @ 2514:091711fb2f8c

Initial logging integration: replace all debug prints with logging calls... ...clean up and replace some with info() logs.
author Richard Jones <richard@users.sourceforge.net>
date Fri, 02 Jul 2004 05:22:09 +0000
parents cd5dcc39193d
children f8dafdd91bf5
line wrap: on
line diff
--- a/test/test_actions.py	Thu Jul 01 03:55:47 2004 +0000
+++ b/test/test_actions.py	Fri Jul 02 05:22:09 2004 +0000
@@ -8,26 +8,7 @@
 from roundup.cgi.actions import *
 from roundup.cgi.exceptions import Redirect, Unauthorised, SeriousError
 
-class MockNull:
-    def __init__(self, **kwargs):
-        for key, value in kwargs.items():
-            self.__dict__[key] = value
-
-    def __call__(self, *args, **kwargs): return MockNull()
-    def __getattr__(self, name):
-        # This allows assignments which assume all intermediate steps are Null
-        # objects if they don't exist yet.
-        #
-        # For example (with just 'client' defined):
-        #
-        # client.db.config.TRACKER_WEB = 'BASE/'
-        self.__dict__[name] = MockNull()
-        return getattr(self, name)
-
-    def __getitem__(self, key): return self
-    def __nonzero__(self): return 0
-    def __str__(self): return ''
-    def __repr__(self): return '<MockNull 0x%x>'%id(self)
+from mocknull import MockNull
 
 def true(*args, **kwargs):
     return 1

Roundup Issue Tracker: http://roundup-tracker.org/