def __init__(self, request): self.request = request self._settings = request.registry.settings self._data = self._settings['data'] self.accounting = Accounting() self.authentication = AuthenticationManager() self.token = Token()
def __init__(self): self.basedb = BaseDB() self.accounting = Accounting()
def step_impl(context): with patch.object(BaseDB, 'insert', return_value=True) as mck_insert: accounting = Accounting() accounting.register(context.username, context.msg, context.category) assert mck_insert.called