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


Python Issue.all方法代码示例

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


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

示例1: setUp

# 需要导入模块: from issues.models import Issue [as 别名]
# 或者: from issues.models.Issue import all [as 别名]
 def setUp(self):
     for issue in Issue.all(): issue.delete()
     for log in Log.all(): log.delete()
     for comment in Comment.all(): comment.delete()
     for group in Group.all(): group.delete()
     for error in Error.all(): error.delete()
     for project in Project.all(): project.delete()
开发者ID:alanjds,项目名称:arecibo,代码行数:9,代码来源:tests.py

示例2: testIssueNotification

# 需要导入模块: from issues.models import Issue [as 别名]
# 或者: from issues.models.Issue import all [as 别名]
 def testIssueNotification(self):
     user = create_user()
 
     issue = Issue()
     issue.description = "This is a test"
     issue.save()
     
     assert Issue.all().count() == 1
开发者ID:andymckay,项目名称:arecibo,代码行数:10,代码来源:tests.py

示例3: issue_by_number

# 需要导入模块: from issues.models import Issue [as 别名]
# 或者: from issues.models.Issue import all [as 别名]
def issue_by_number(pk):
    """ Get's the issue by a primary key or a number, i like hacking the url so
        you can just put in a number in the URL """
    number = safe_int(pk)
    if number:
        issues = Issue.all().filter("number = ", number)
        return issues[0]
    else:
        return Issue.get(pk)
开发者ID:alanjds,项目名称:arecibo,代码行数:11,代码来源:views.py

示例4: testIssueAndErrorNotification

# 需要导入模块: from issues.models import Issue [as 别名]
# 或者: from issues.models.Issue import all [as 别名]
    def testIssueAndErrorNotification(self):
        user = create_user()
        
        issue = Issue()
        issue.description = "This is a test"
        issue.save()
        
        assert Issue.all().count() == 1

        c = Client()
        c.post(reverse("error-post"), test_data)

        #assert Notification.all().count() == 2
        # this would be 2 when issues are turned on
        assert Notification.all().count() == 1
        
        c = Client()
        res = c.get(reverse("notification-send"))        
        self.assertEquals(len(mail.outbox), 1)
开发者ID:andymckay,项目名称:arecibo,代码行数:21,代码来源:tests.py

示例5: setUp

# 需要导入模块: from issues.models import Issue [as 别名]
# 或者: from issues.models.Issue import all [as 别名]
 def setUp(self):
     for error in Error.all(): error.delete()
     for notification in Notification.all(): notification.delete()
     for user in AppUser.all(): user.delete()
     for issue in Issue.all(): issue.delete()
开发者ID:andymckay,项目名称:arecibo,代码行数:7,代码来源:tests.py


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