added mass subscribtions tests
1 parent 373d292 commit ac29c95956a767f8bc97f62db8d0e6e5e3be3038
@benste benste authored on 15 Aug 2011
Showing 2 changed files
View
46
tests/test_to_check.txt
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
========================
View
32
tests/tests.py
... "name": "unsubscribe",
... "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
===============