Merge lp:~prakhar126/postorius/postorius into lp:postorius

Proposed by pjoshi
Status: Needs review
Proposed branch: lp:~prakhar126/postorius/postorius
Merge into: lp:postorius
Diff against target: 44 lines (+26/-1)
2 files modified
src/postorius/templates/postorius/user_tasks.html (+3/-1)
src/postorius/tests/test_forms.py (+23/-0)
To merge this branch: bzr merge lp:~prakhar126/postorius/postorius
Reviewer Review Type Date Requested Status
Terri Needs Fixing
Review via email: mp+252422@code.launchpad.net

Description of the change

Adding test cases for creating new list.

To post a comment you must log in.
Revision history for this message
Terri (terriko) wrote :

I'm getting the following error:

  File "/Users/terri/Code/mailman/postorius/src/postorius/tests/test_forms.py", line 58
    'mail_host': 'mailman.most-desirable.org'
               ^
SyntaxError: invalid syntax

If you could tidy that up, that would be great!

review: Needs Fixing

Unmerged revisions

204. By pjoshi

adding test case for new list form

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/postorius/templates/postorius/user_tasks.html'
--- src/postorius/templates/postorius/user_tasks.html 2014-10-15 20:59:52 +0000
+++ src/postorius/templates/postorius/user_tasks.html 2015-03-10 12:00:51 +0000
@@ -4,5 +4,7 @@
44
5{% block main %}5{% block main %}
6 <h1>{% trans "To Do" %}</h1>6 <h1>{% trans "To Do" %}</h1>
7 <p>{% trans "There are no pending tasks at the present time." %}</p>7 {% for tasks in memberships %}
8 <p> {% trans tasks %}</p>
9 {% endfor %}
8{% endblock main %}10{% endblock main %}
911
=== modified file 'src/postorius/tests/test_forms.py'
--- src/postorius/tests/test_forms.py 2015-02-09 14:35:44 +0000
+++ src/postorius/tests/test_forms.py 2015-03-10 12:00:51 +0000
@@ -49,3 +49,26 @@
49 'contact_address': 'contact@mailman.most-desirable.org',49 'contact_address': 'contact@mailman.most-desirable.org',
50 })50 })
51 self.assertFalse(form.is_valid())51 self.assertFalse(form.is_valid())
52
53class ListNewTest(unittest.TestCase):
54
55 def test_form_fields_list(self):
56 form = ListNew({
57 'listname': 'xyz'
58 'mail_host': 'mailman.most-desirable.org'
59 'list_owner': 'contact@mailman.most-desirable.org'
60 'advertise': 'abcd'
61 'description': 'The Most Desirable organization'
62 })
63 self.assertTrue(form.is_valid)
64
65 def test_form_fields_list_invalid(self):
66 form = ListNew({
67 'listname': ''xy#z'
68 'mail_host': 'mailman.most-desirable.org'
69 'list_owner': 'mailman.most-desirable.org'
70 'advertise': 'abcd'
71 'description': 'The Most Desirable organization'
72 })
73 self.assertFalse(form.is_valid)
74
52\ No newline at end of file75\ No newline at end of file

Subscribers

People subscribed via source and target branches