Beispiel #1
0
    def __init__(self, operation_list_path: str) -> None:
        validator.validate_string_not_empty(operation_list_path)

        self.operation_manager = OperationManager()
        self.out_file = open(operation_list_path + '-output', 'w+')

        self.log('Parsing operation list...')

        with open(operation_list_path) as csv_file:
            reader = csv.reader(csv_file, skipinitialspace=True)
            self.operation_list = list(reader)

        self.operation_count = len(self.operation_list)

        self.log(' success ({0} items read).\n'.format(
            str(self.operation_count)))
Beispiel #2
0
    def test_validate_string_not_empty(self):
        self.assertEqual(validator.validate_string_not_empty('test'), 'test')

        with self.assertRaises(ValueError):
            validator.validate_string_not_empty('')
Beispiel #3
0
 def password(self, password: str) -> None:
     self.__password = validator.validate_string_not_empty(password)
Beispiel #4
0
 def username(self, username: str) -> None:
     self.__username = validator.validate_string_not_empty(username)
Beispiel #5
0
 def url(self, url):
     self.__url = validator.validate_string_not_empty(url)
Beispiel #6
0
 def auth_token(self, auth_token):
     self.__auth_token = validator.validate_string_not_empty(auth_token)