本文整理汇总了Python中sahara.service.validations.edp.data_source.check_data_source_create函数的典型用法代码示例。如果您正苦于以下问题:Python check_data_source_create函数的具体用法?Python check_data_source_create怎么用?Python check_data_source_create使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了check_data_source_create函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_hdfs_creation_local_abs_url
def test_hdfs_creation_local_abs_url(self, check_data_source_unique_name):
check_data_source_unique_name.return_value = True
data = {
"name": "test_data_data_source",
"url": "/tmp/output",
"type": "hdfs",
"description": "correct url schema for absolute path on local hdfs"
}
ds.check_data_source_create(data)
开发者ID:hongbin,项目名称:sahara,代码行数:9,代码来源:test_data_source.py
示例2: test_hdfs_creation_local_rel_url
def test_hdfs_creation_local_rel_url(self, check_data_source_unique_name):
check_data_source_unique_name.return_value = True
data = {
"name": "test_data_data_source",
"url": "mydata/input",
"type": "hdfs",
"description": "correct url schema for relative path on local hdfs"
}
ds.check_data_source_create(data)
开发者ID:hongbin,项目名称:sahara,代码行数:9,代码来源:test_data_source.py
示例3: test_hdfs_creation_correct_url
def test_hdfs_creation_correct_url(self, check_data_source_unique_name):
check_data_source_unique_name.return_value = True
data = {
"name": "test_data_data_source",
"url": "hdfs://test_cluster/",
"type": "hdfs",
"description": "correct url schema"
}
ds.check_data_source_create(data)
开发者ID:hongbin,项目名称:sahara,代码行数:10,代码来源:test_data_source.py
示例4: test_manila_creation_empty_url
def test_manila_creation_empty_url(self, check_ds_unique_name):
check_ds_unique_name.return_value = True
data = {
"name": "test_data_data_source",
"url": "",
"type": "manila",
"description": ("empty url")
}
with testtools.ExpectedException(ex.InvalidDataException):
ds.check_data_source_create(data)
开发者ID:Imperat,项目名称:sahara,代码行数:10,代码来源:test_data_source.py
示例5: test_manila_creation_no_path
def test_manila_creation_no_path(self, check_ds_unique_name):
check_ds_unique_name.return_value = True
data = {
"name": "test_data_data_source",
"url": "manila://%s" % uuid.uuid4(),
"type": "manila",
"description": ("netloc is not a uuid")
}
with testtools.ExpectedException(ex.InvalidDataException):
ds.check_data_source_create(data)
开发者ID:Imperat,项目名称:sahara,代码行数:10,代码来源:test_data_source.py
示例6: test_manila_creation_wrong_schema
def test_manila_creation_wrong_schema(self, check_ds_unique_name):
check_ds_unique_name.return_value = True
data = {
"name": "test_data_data_source",
"url": "man://%s" % uuid.uuid4(),
"type": "manila",
"description": ("incorrect url schema for")
}
with testtools.ExpectedException(ex.InvalidDataException):
ds.check_data_source_create(data)
开发者ID:Imperat,项目名称:sahara,代码行数:10,代码来源:test_data_source.py
示例7: test_hdfs_creation_wrong_schema
def test_hdfs_creation_wrong_schema(self, check_data_source_unique_name):
check_data_source_unique_name.return_value = True
data = {
"name": "test_data_data_source",
"url": "hdf://test_cluster/",
"type": "hdfs",
"description": "incorrect url schema"
}
with self.assertRaises(ex.InvalidException):
ds.check_data_source_create(data)
开发者ID:hongbin,项目名称:sahara,代码行数:11,代码来源:test_data_source.py
示例8: test_maprfs_creation_wrong_schema
def test_maprfs_creation_wrong_schema(self, check_data_source_unique_name):
check_data_source_unique_name.return_value = True
data = {
"name": "test_data_data_source",
"url": "maprf://test_cluster/",
"type": "maprfs",
"description": "incorrect url schema"
}
with testtools.ExpectedException(ex.InvalidException):
ds.check_data_source_create(data)
开发者ID:a9261,项目名称:sahara,代码行数:11,代码来源:test_data_source.py
示例9: test_swift_creation_wrong_schema
def test_swift_creation_wrong_schema(self, check_data_source_unique_name):
check_data_source_unique_name.return_value = True
data = {
"name": "test_data_data_source",
"url": "swif://1234/object",
"type": "swift",
"description": "incorrect url schema"
}
with testtools.ExpectedException(ex.InvalidDataException):
ds.check_data_source_create(data)
开发者ID:Imperat,项目名称:sahara,代码行数:11,代码来源:test_data_source.py
示例10: test_swift_creation_missing_credentials
def test_swift_creation_missing_credentials(self, check_data_source_unique_name):
check_data_source_unique_name.return_value = True
data = {
"name": "test_data_data_source",
"url": SAMPLE_SWIFT_URL,
"type": "swift",
"description": "long description",
}
with testtools.ExpectedException(ex.InvalidCredentials):
ds.check_data_source_create(data)
开发者ID:JohannaMW,项目名称:sahara,代码行数:11,代码来源:test_data_source.py
示例11: test_swift_creation_wrong_schema
def test_swift_creation_wrong_schema(self, check_data_source_unique_name):
check_data_source_unique_name.return_value = True
data = {
"name": "test_data_data_source",
"url": "swif://1234%s/object" % su.SWIFT_URL_SUFFIX,
"type": "swift",
"description": "incorrect url schema"
}
with self.assertRaises(ex.InvalidException):
ds.check_data_source_create(data)
开发者ID:esala116,项目名称:sahara,代码行数:11,代码来源:test_data_source.py
示例12: test_swift_creation_missing_object
def test_swift_creation_missing_object(self,
check_data_source_unique_name):
check_data_source_unique_name.return_value = True
data = {
"name": "test_data_data_source",
"url": "swift://1234/",
"type": "swift",
"description": "incorrect url schema"
}
with self.assertRaises(ex.InvalidException):
ds.check_data_source_create(data)
开发者ID:hongbin,项目名称:sahara,代码行数:12,代码来源:test_data_source.py
示例13: test_swift_creation_missing_credentials
def test_swift_creation_missing_credentials(self,
check_data_source_unique_name):
check_data_source_unique_name.return_value = True
data = {
"name": "test_data_data_source",
"url": "swift://1234",
"type": "swift",
"description": "long description"
}
with self.assertRaises(ex.InvalidCredentials):
ds.check_data_source_create(data)
开发者ID:qinweiwei,项目名称:sahara,代码行数:12,代码来源:test_data_source.py
示例14: test_swift_creation_missing_credentials
def test_swift_creation_missing_credentials(self,
check_data_source_unique_name):
check_data_source_unique_name.return_value = True
data = {
"name": "test_data_data_source",
"url": SAMPLE_SWIFT_URL,
"type": "swift",
"description": "long description"
}
with testtools.ExpectedException(ex.InvalidCredentials):
ds.check_data_source_create(data)
# proxy enabled should allow creation without credentials
self.override_config('use_domain_for_proxy_users', True)
ds.check_data_source_create(data)
开发者ID:a9261,项目名称:sahara,代码行数:15,代码来源:test_data_source.py
示例15: test_swift_creation_credentials_missing_password
def test_swift_creation_credentials_missing_password(
self,
check_data_source_unique_name):
check_data_source_unique_name.return_value = True
data = {
"name": "test_data_data_source",
"url": SAMPLE_SWIFT_URL,
"type": "swift",
"credentials": {
"user": "user",
},
"description": "long description"
}
with self.assertRaises(ex.InvalidCredentials):
ds.check_data_source_create(data)
开发者ID:hongbin,项目名称:sahara,代码行数:16,代码来源:test_data_source.py
注:本文中的sahara.service.validations.edp.data_source.check_data_source_create函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论