diff --git a/tests/test_to_check.txt b/tests/test_to_check.txt index 1c65b18..caee23b 100644 --- a/tests/test_to_check.txt +++ b/tests/test_to_check.txt @@ -1,49 +1,3 @@ - -Mass Subscribe Users (within settings) -==================== - -Now we want to mass subscribe a few users to the list. Therefore, -go to the mass subscription page. - - >>> url = '/settings/new_list1%40mail.example.com/mass_subscribe/' - >>> response = c.get(url) - -Check that everything went well by making sure the status code -was correct. - - >>> response.status_code - 200 - -Try mass subscribing the users 'liza@example.com' and -'george@example.com'. Each address should be provided on a separate -line so add '\\n' between the names to indicate that this was done -(we're on a Linux machine which is why the letter 'n' was used and -the double '\\' instead of a single one is to escape the string -parsing of Python). - - >>> url = '/settings/new_list1%40mail.example.com/mass_subscribe/' - - >>> response = c.post(url, - ... {"emails": "liza@example.com\\ngeorge@example.com"}) - -If everything was successful, we shall get a positive response from -the page. We'll check that this was the case. - - >>> print "The mass subscription was successful." in response.content - True - -Done with the admin stuff. Now let's log out. - - >>> response = c.get('/lists/logout/',) - -If the request was successful we should end up on the list info page. -Now make sure that we got redirected there. - - >>> print "All mailing lists" in response.content - True - - - ## was success until here (old template) Change the User Settings diff --git a/tests/tests.py b/tests/tests.py index 7779e01..465aade 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -203,6 +203,38 @@ ... "fqdn_listname": "new_list1@mail.example.com"}) >>> print (_('Unsubscribed')+' katie@example.com') in response.content True + +Mass Subscribe Users (within settings) +==================== + +Now we want to mass subscribe a few users to the list. Therefore, +go to the mass subscription page. + + >>> url = '/subscriptions/new_list1%40mail.example.com/mass_subscribe/' + >>> response = c.get(url) + +Check that everything went well by making sure the status code +was correct. + + >>> response.status_code + 200 + +Try mass subscribing the users 'liza@example.com' and +'george@example.com'. Each address should be provided on a separate +line so add '\\n' between the names to indicate that this was done +(we're on a Linux machine which is why the letter 'n' was used and +the double '\\' instead of a single one is to escape the string +parsing of Python). + + >>> url = '/subscriptions/new_list1%40mail.example.com/mass_subscribe/' + >>> response = c.post(url, + ... {"emails": "liza@example.com\\ngeorge@example.com"}) + +If everything was successful, we shall get a positive response from +the page. We'll check that this was the case. + + >>> print _("The mass subscription was successful.") in response.content + True Finishing Test ===============