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


Python Issue.gets_by_assignee_id方法代码示例

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


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

示例1: test_get_issue

# 需要导入模块: from vilya.models.issue import Issue [as 别名]
# 或者: from vilya.models.issue.Issue import gets_by_assignee_id [as 别名]
    def test_get_issue(self):

        issue1 = Issue.add('test1', 'test1 description', 'test', 'assignee')
        issue2 = Issue.add('test2', 'test2 description', 'test', 'assignee')
        issue2.close("test")

        i1 = Issue.get(issue1.id)
        assert isinstance(i1, Issue)
        assert i1.title == 'test1'
        assert i1.description == 'test1 description'
        assert i1.creator_id == 'test'
        assert i1.assignee_id == 'assignee'
        assert i1.closer_id is None

        i2 = Issue.get(issue2.id)
        assert isinstance(i2, Issue)
        assert i2.title == 'test2'
        assert i2.description == 'test2 description'
        assert i2.creator_id == 'test'
        assert i2.assignee_id == 'assignee'
        assert i2.closer_id == 'test'

        i1 = Issue.get(issue1.id)
        assert isinstance(i1, Issue)
        assert i1.title == 'test1'
        assert i1.description == 'test1 description'
        assert i1.creator_id == 'test'
        assert i1.assignee_id == 'assignee'
        assert i1.closer_id is None

        iss = Issue.gets_by_creator_id("test")
        assert all([isinstance(i, Issue) for i in iss])
        assert len(iss) == 4

        iss = Issue.gets_by_creator_id("test", "open")
        assert all([isinstance(i, Issue) for i in iss])
        assert len(iss) == 4

        iss = Issue.gets_by_creator_id("test", "closed")
        assert all([isinstance(i, Issue) for i in iss])
        assert len(iss) == 2

        iss = Issue.gets_by_assignee_id("assignee")
        assert all([isinstance(i, Issue) for i in iss])
        assert len(iss) == 6

        iss = Issue.gets_by_assignee_id("assignee", "open")
        assert all([isinstance(i, Issue) for i in iss])
        assert len(iss) == 4

        iss = Issue.gets_by_assignee_id("assignee", "closed")
        assert all([isinstance(i, Issue) for i in iss])
        assert len(iss) == 2

        iss = Issue.gets_by_closer_id("test")
        assert all([isinstance(i, Issue) for i in iss])
        assert len(iss) == 2
开发者ID:000fan000,项目名称:code,代码行数:59,代码来源:test_issue.py

示例2: gets_by_assignee_id

# 需要导入模块: from vilya.models.issue import Issue [as 别名]
# 或者: from vilya.models.issue.Issue import gets_by_assignee_id [as 别名]
 def gets_by_assignee_id(cls, user_id, state=None):
     from vilya.models.issue import Issue
     return Issue.gets_by_assignee_id(user_id, state)
开发者ID:000fan000,项目名称:code,代码行数:5,代码来源:user_issue.py


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