mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-18 05:58:02 +00:00
Remove trailing whitespaces and test delete inexisting photo
This commit is contained in:
@@ -308,6 +308,22 @@ class Tester(TestCase):
|
|||||||
self.assertEqual(str(list(response.context[0]['messages'])[0]),
|
self.assertEqual(str(list(response.context[0]['messages'])[0]),
|
||||||
'Photo deleted successfully', 'Photo deletion did not work?')
|
'Photo deleted successfully', 'Photo deletion did not work?')
|
||||||
|
|
||||||
|
def test_delete_inexisting_photo(self):
|
||||||
|
'''
|
||||||
|
test deleting the photo
|
||||||
|
'''
|
||||||
|
|
||||||
|
# Ensure we have a photo
|
||||||
|
self.test_gravatar_photo_import()
|
||||||
|
|
||||||
|
url = reverse('delete_photo', args=[1234])
|
||||||
|
response = self.client.get(url, follow=True)
|
||||||
|
self.assertEqual(response.status_code, 200,
|
||||||
|
'post to delete does not work?')
|
||||||
|
self.assertEqual(str(list(response.context[0]['messages'])[0]),
|
||||||
|
'No such image or no permission to delete it',
|
||||||
|
'Deleting photo that does not exist, should return error message')
|
||||||
|
|
||||||
def test_too_many_unconfirmed_email(self):
|
def test_too_many_unconfirmed_email(self):
|
||||||
'''
|
'''
|
||||||
Request too many unconfirmed email addresses, make sure we
|
Request too many unconfirmed email addresses, make sure we
|
||||||
|
|||||||
Reference in New Issue
Block a user