Exemplo n.º 1
0
 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()
Exemplo n.º 2
0
 def testIssueNotification(self):
     user = create_user()
 
     issue = Issue()
     issue.description = "This is a test"
     issue.save()
     
     assert Issue.all().count() == 1
Exemplo n.º 3
0
    def testIssueNotification(self):
        user = create_user()

        issue = Issue()
        issue.description = "This is a test"
        issue.save()

        assert Issue.all().count() == 1
Exemplo n.º 4
0
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)
Exemplo n.º 5
0
 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()
Exemplo n.º 6
0
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)
Exemplo n.º 7
0
 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()
Exemplo n.º 8
0
    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)
Exemplo n.º 9
0
    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)
Exemplo n.º 10
0
 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()