about summary refs log tree commit diff stats
path: root/test/__init__.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-12-13 19:42:51 +0100
committerhut <hut@lavabit.com>2009-12-13 19:42:51 +0100
commit1159f9ec182496ddc5324f23fb1d5eae73fe63e3 (patch)
tree02a79bdd232b7aa5f49e7ee9ec713141a4118358 /test/__init__.py
parent4c05e43d11430fbfd8a5d86ae0070e24775251b1 (diff)
downloadranger-1159f9ec182496ddc5324f23fb1d5eae73fe63e3.tar.gz
updated / added tests
Diffstat (limited to 'test/__init__.py')
-rw-r--r--test/__init__.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/__init__.py b/test/__init__.py
index 500d3383..3043ba18 100644
--- a/test/__init__.py
+++ b/test/__init__.py
@@ -6,3 +6,24 @@ __all__ = [ x[0:x.index('.')] \
 
 def init():
 	sys.path.append(os.path.abspath(os.path.join(sys.path[0], '..')))
+
+class Fake(object):
+	def __getattr__(self, attrname):
+		if not hasattr(self, attrname):
+			setattr(self, attrname, Fake())
+		return self.__dict__[attrname]
+
+	def __call__(self, *_):
+		return Fake()
+
+	def __clear__(self):
+		self.__dict__.clear()
+
+	def __iter__(self):
+		return iter(())
+
+class OK(Exception):
+	pass
+
+def raise_ok(*_, **__):
+	raise OK()