当前位置: 首页>>代码示例>>Python>>正文


Python CharonSession.delete方法代码示例

本文整理汇总了Python中ngi_pipeline.database.classes.CharonSession.delete方法的典型用法代码示例。如果您正苦于以下问题:Python CharonSession.delete方法的具体用法?Python CharonSession.delete怎么用?Python CharonSession.delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ngi_pipeline.database.classes.CharonSession的用法示例。


在下文中一共展示了CharonSession.delete方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: TestCommunicate

# 需要导入模块: from ngi_pipeline.database.classes import CharonSession [as 别名]
# 或者: from ngi_pipeline.database.classes.CharonSession import delete [as 别名]
class TestCommunicate(unittest.TestCase):

    def setUp(self):
        # Create the test project
        self.project_id = "P100000"
        self.project_name = "P.Mayhem_14_01"
        self.project_data = dict(projectid=self.project_id, name=self.project_name, status=None)
        self.session = CharonSession()
        response = self.session.post(self.session.construct_charon_url('project'),
                                     data=json.dumps(self.project_data))
        assert response.status_code == 201, "Could not create test project in Charon: {}".format(response.reason)
        project = response.json()
        assert project['projectid'] == self.project_id, "Test project ID is incorrect"


    def tearDown(self):
        # Remove the test project
        response = self.session.delete(self.session.construct_charon_url('project', self.project_id))
        assert response.status_code == 204, "Could not delete test project from Charon: {}".format(response.reason)


    def test_get_project_id_from_name(self):
        # Check that it matches
        self.assertEqual(self.project_id, get_project_id_from_name(self.project_name))

    def test_rebuild_project_obj_from_charon(self):
        # Create fake project / sample / libprep / seqrun
        pass
开发者ID:Galithil,项目名称:ngi_pipeline,代码行数:30,代码来源:test_communicate.py


注:本文中的ngi_pipeline.database.classes.CharonSession.delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。