예제 #1
0
 def test_feedback_linebreaks(self):
     decision = self.make_decision(description="Lorem")
     feedback = Feedback(description="text\ntext")
     feedback.decision = decision
     feedback.author = self.user
     feedback.save()
     path = reverse("publicweb_feedback_detail", args=[feedback.id])
     response = self.client.get(path)
     self.assertContains(response, "text<br />text", 1, msg_prefix="Failed to line break text")
예제 #2
0
 def test_feedback_author_shown(self):
     decision = self.make_decision(description="Lorem Ipsum")
     feedback = Feedback(description="Dolor sit")
     feedback.author = self.user
     feedback.decision = decision
     feedback.save()
     
     self.user = self.login('charlie')        
     path = reverse('publicweb_item_detail', args=[decision.id])
     response = self.client.get(path)
     betty = User.objects.get(username='******')
     self.assertContains(response, betty.first_name)
예제 #3
0
 def test_feedback_linebreaks(self):
     decision = self.make_decision(description="Lorem")
     feedback = Feedback(description="text\ntext")
     feedback.decision = decision
     feedback.author = self.user
     feedback.save()
     path = reverse('publicweb_feedback_detail', args=[feedback.id])
     response = self.client.get(path)
     self.assertContains(response,
                         'text<br />text',
                         1,
                         msg_prefix="Failed to line break text")
예제 #4
0
    def test_feedback_author_shown(self):
        decision = self.make_decision(description="Lorem Ipsum")
        feedback = Feedback(description="Dolor sit")
        feedback.author = self.user
        feedback.decision = decision
        feedback.save()

        self.user = self.login('charlie')
        path = reverse('publicweb_item_detail', args=[decision.id])
        response = self.client.get(path)
        betty = User.objects.get(username='******')
        self.assertContains(response, betty.first_name)
예제 #5
0
 def test_feedback_author_shown(self):
     self.user = self.login('Barry')
     decision = Decision(description="Lorem Ipsum")
     decision.save()
     feedback = Feedback(description="Dolor sit")
     feedback.author = self.user
     feedback.decision = decision
     feedback.save()
     
     self.user = self.login('Adam')        
     path = reverse('publicweb_item_detail', args=[decision.id])
     response = self.client.get(path)
     barry = User.objects.get(username='******')
     self.assertContains(response, barry.username)