def _get_or_create_object(self, name, proxy_type): if self.state != _STATE_ACTIVE: raise TransactionError("Transaction is not in active state.") self._check_thread() key = (proxy_type, name) try: return self._objects[key] except KeyError: proxy = proxy_type(name, self) self._objects[key] = proxy return make_blocking(proxy)
def blocking(self): """Returns a version of this proxy with only blocking method calls.""" return make_blocking(self)
def blocking(self): """ :return: Return a version of this proxy with only blocking method calls """ return make_blocking(self)
def setUp(self): self.calculator = make_blocking(MakeBlockingTest.Calculator())