Esempio n. 1
0
class Expector(object):

    def __init__(self, default_return_value_creator=DefaultReturnValueCreator,
                 **methods_to_delegate):
        self._test_environment = TestEnvironment()
        self._default_return_value_creator = default_return_value_creator
        self._methods_to_delegate = methods_to_delegate

    def __call__(self, obj):
        return ExpectorWithObj(obj, self._test_environment,
                               self._default_return_value_creator,
                               self._methods_to_delegate)

    def reset(self):
        self._test_environment.reset()

    def verify(self):
        self._test_environment.verify_expectations()
Esempio n. 2
0
 def __init__(self, default_return_value_creator=DefaultReturnValueCreator,
              **methods_to_delegate):
     self._test_environment = TestEnvironment()
     self._default_return_value_creator = default_return_value_creator
     self._methods_to_delegate = methods_to_delegate