[extensions-web] errorreports: Fix some more
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] errorreports: Fix some more
- Date: Thu, 1 Dec 2011 02:32:08 +0000 (UTC)
commit de0a5f0495bd67fa018f48c99150ed8c9fb637c4
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Nov 30 21:30:18 2011 -0500
errorreports: Fix some more
.../templates/errorreports/report_mail.txt | 2 +-
.../errorreports/templates/errorreports/view.html | 4 ++--
sweettooth/errorreports/tests.py | 8 +++++---
3 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/sweettooth/errorreports/templates/errorreports/report_mail.txt b/sweettooth/errorreports/templates/errorreports/report_mail.txt
index 3c400df..a392cd2 100644
--- a/sweettooth/errorreports/templates/errorreports/report_mail.txt
+++ b/sweettooth/errorreports/templates/errorreports/report_mail.txt
@@ -1,6 +1,6 @@
Your extension, "{{ extension.name }}" has received an error report from {{ report.user }}:
-{{ report.comments }}
+{{ report.comment }}
You can see the full report at:
diff --git a/sweettooth/errorreports/templates/errorreports/view.html b/sweettooth/errorreports/templates/errorreports/view.html
index 6b7b754..59722b0 100644
--- a/sweettooth/errorreports/templates/errorreports/view.html
+++ b/sweettooth/errorreports/templates/errorreports/view.html
@@ -1,7 +1,7 @@
{% extends "base.html" %}
-{% block title %}Error report on "{{ report.version.extension.name }}" - {{ block.super }}{% endblock %}
+{% block title %}Error report on "{{ report.extension.name }}" - {{ block.super }}{% endblock %}
{% block body %}
-<h2><em>{{ report.user }}'s report for "{{ report.version.extension.name }}"</em></h2>
+<h2><em>{{ report.user }}'s report for "{{ report.extension.name }}"</em></h2>
<div id="error_report">
<h3> Comments for the author </h3>
diff --git a/sweettooth/errorreports/tests.py b/sweettooth/errorreports/tests.py
index 75e463a..54c7088 100644
--- a/sweettooth/errorreports/tests.py
+++ b/sweettooth/errorreports/tests.py
@@ -31,11 +31,12 @@ class SubmitErrorReportTestCase(TestCase):
def test_no_contact_information(self):
comment = "No contact information"
- response = self.client.post(reverse('errorreports-report', kwargs=dict(pk=self.extension.pk)),
- dict(can_contact=False,
- comment=comment), follow=True)
+ self.client.post(reverse('errorreports-report', kwargs=dict(pk=self.extension.pk)),
+ dict(can_contact=False,
+ comment=comment), follow=True)
self.assertEqual(len(mail.outbox), 1)
+ self.assertIn(comment, mail.outbox[0].body)
error_report = models.ErrorReport.objects.get(comment=comment)
self.assertEqual(error_report.can_contact, False)
@@ -47,5 +48,6 @@ class SubmitErrorReportTestCase(TestCase):
comment=comment), follow=True)
self.assertEqual(len(mail.outbox), 1)
+ self.assertIn(comment, mail.outbox[0].body)
error_report = models.ErrorReport.objects.get(comment=comment)
self.assertEqual(error_report.can_contact, True)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]