def __init__(self, connection_string):

        pre_condition_arg(self, connection_string, of_type=str)

        self.connection_details = DBConnectionDetails(connection_string)
        self._db_client = MongoClient(connection_string, _connect=False)
        self._todos_db = None
    def __init__(self, connection_string):

        pre_condition_arg(self, connection_string, of_type=str)

        self.connection_details = DBConnectionDetails(connection_string)
        self._db_client = MongoClient(connection_string, _connect=False)
        self._todos_db = None
 def __init__(self, todolist_repository):
     """
     @type todolist_repository: ITodoListRepository
     """
     pre_condition_arg(self,
                       todolist_repository,
                       of_type=ITodoListRepository)
     self._todo_list_repository = todolist_repository
    def __init__(self, environment_settings_loader):

        pre_condition_arg(self, environment_settings_loader, EnvironmentSettingsLoader)
        self._environment_settings_loader = environment_settings_loader

        self._static_files_root_folder_path = ''  # Default is current folder

        self._app = Flask(__name__)  # , static_folder='Client', static_url_path='')
        self._api = Api(self._app)
    def __init__(self, user_repository, password_hasher, flask_app):

        pre_condition_arg(self, user_repository, of_type=IUserRepository)
        self._user_repository = user_repository

        pre_condition_arg(self, password_hasher, of_type=IPasswordHasher)
        self._password_hasher = password_hasher

        pre_condition_arg(self, flask_app, of_type=Flask)
        self._flask_app = flask_app

        self._secrets = SecretAuthKeys()
    def __init__(self, user_repository, password_hasher, flask_app):

        pre_condition_arg(self, user_repository, of_type=IUserRepository)
        self._user_repository = user_repository

        pre_condition_arg(self, password_hasher, of_type=IPasswordHasher)
        self._password_hasher = password_hasher

        pre_condition_arg(self, flask_app, of_type=Flask)
        self._flask_app = flask_app

        self._secrets = SecretAuthKeys()
Esempio n. 7
0
    def __init__(self, name, owner_ids, todos=[], list_id: str=None):
        pre_condition_arg(self, name, of_type=str)
        self._name = name

        pre_condition_arg(self, todos, list_of_type=TodoTask)
        self._todos = todos

        pre_condition_arg(self, owner_ids, list_of_type=str)
        if len(owner_ids) < 1:
            raise ValueError("Todo list must have at least one owner")

        self._owner_ids = owner_ids

        if list_id:
            if not isinstance(list_id, str):
                raise ValueError("list_id must be a unique identifier string")
            self._list_id = list_id
        else:
            self._list_id = str(uuid1())
 def __init__(self, connection_string: str):
     pre_condition_arg(self, connection_string, of_type=str)
     self._db_client = MongoClient(connection_string, _connect=False)
     self._todolist_db = None
 def __init__(self, connection_string: str):
     pre_condition_arg(self, connection_string, of_type=str)
     self._db_client = MongoClient(connection_string, _connect=False)
     self._todolist_db = None