# HG changeset patch # User Jeff Hammel # Date 1307601356 25200 # Node ID 49f88cde6219955d0a121dfaef681ed9d9e28c9b # Parent f724db08612500f2f845d33cc577519a8e89af67 make the test wrapper more interesting (and testable) diff -r f724db086125 -r 49f88cde6219 tests/objects.py --- a/tests/objects.py Wed Jun 08 23:29:50 2011 -0700 +++ b/tests/objects.py Wed Jun 08 23:35:56 2011 -0700 @@ -22,13 +22,15 @@ return number * self.factor class Wrapper(object): - def __init__(self, app): + def __init__(self, app, **values): self.app = app + self.values = dict([(int(i), j) for i, j in values]) def __call__(self, *args, **kwargs): retval = self.app(*args, **kwargs) values = {1: 'one', 2: 'two', 3: 'three'} # etc + values.update(self.values) if retval in values: return values[retval] return retval