本文整理汇总了Python中tvb.tests.framework.core.factory.TestFactory.import_default_project方法的典型用法代码示例。如果您正苦于以下问题:Python TestFactory.import_default_project方法的具体用法?Python TestFactory.import_default_project怎么用?Python TestFactory.import_default_project使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tvb.tests.framework.core.factory.TestFactory
的用法示例。
在下文中一共展示了TestFactory.import_default_project方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: transactional_setup_method
# 需要导入模块: from tvb.tests.framework.core.factory import TestFactory [as 别名]
# 或者: from tvb.tests.framework.core.factory.TestFactory import import_default_project [as 别名]
def transactional_setup_method(self):
"""
Sets up the environment for running the tests;
creates a test user, a test project, a connectivity and a surface;
imports a CFF data-set
"""
self.test_user = TestFactory.create_user("UserRM")
self.test_project = TestFactory.import_default_project(self.test_user)
self.connectivity = self._get_entity(Connectivity)
self.surface = self._get_entity(CorticalSurface)
示例2: transactional_setup_method
# 需要导入模块: from tvb.tests.framework.core.factory import TestFactory [as 别名]
# 或者: from tvb.tests.framework.core.factory.TestFactory import import_default_project [as 别名]
def transactional_setup_method(self):
"""
Sets up the environment for running the tests;
creates a test user, a test project, a connectivity and a surface;
imports a CFF data-set
"""
self.test_user = TestFactory.create_user()
self.test_project = TestFactory.import_default_project(self.test_user)
self.surface = TestFactory.get_entity(self.test_project, CorticalSurface())
assert self.surface is not None
self.region_mapping = TestFactory.get_entity(self.test_project, RegionMapping())
assert self.region_mapping is not None
示例3: transactional_setup_method
# 需要导入模块: from tvb.tests.framework.core.factory import TestFactory [as 别名]
# 或者: from tvb.tests.framework.core.factory.TestFactory import import_default_project [as 别名]
def transactional_setup_method(self):
"""
Sets up the environment for running the tests;
creates a test user, a test project, a connectivity, a cortical surface and a face surface;
imports a CFF data-set
"""
self.datatypeFactory = DatatypesFactory()
self.test_user = self.datatypeFactory.get_user()
self.test_project = TestFactory.import_default_project(self.test_user)
self.datatypeFactory.project = self.test_project
self.connectivity = TestFactory.get_entity(self.test_project, Connectivity())
assert self.connectivity is not None
self.face_surface = TestFactory.get_entity(self.test_project, FaceSurface())
assert self.face_surface is not None
assert TestFactory.get_entity(self.test_project, EEGCap()) is not None
示例4: transactional_setup_method
# 需要导入模块: from tvb.tests.framework.core.factory import TestFactory [as 别名]
# 或者: from tvb.tests.framework.core.factory.TestFactory import import_default_project [as 别名]
def transactional_setup_method(self):
"""
Prepare the database before each test.
"""
self.import_service = ImportService()
self.flow_service = FlowService()
self.project_service = ProjectService()
self.test_user = TestFactory.create_user()
self.delete_project_folders()
result = self.count_all_entities(DataType)
assert 0 == result, "There should be no data type in DB"
result = self.count_all_entities(Project)
assert 0 == result
self.test_project = TestFactory.import_default_project(self.test_user)
self.operation = TestFactory.create_operation(test_user=self.test_user, test_project=self.test_project)
self.adapter_instance = TestFactory.create_adapter()