Mercurial > public > sg101
comparison contact/tests/test_views.py @ 893:3aecf9058130
Merge with upstream.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 17 Feb 2015 18:59:06 -0600 |
parents | 79a71b9d0a2a |
children | b957e4829a03 |
comparison
equal
deleted
inserted
replaced
889:ae146e30d588 | 893:3aecf9058130 |
---|---|
25 self.assertRedirects(response, reverse('contact-thanks')) | 25 self.assertRedirects(response, reverse('contact-thanks')) |
26 | 26 |
27 self.assertEqual(len(mail.outbox), 1) | 27 self.assertEqual(len(mail.outbox), 1) |
28 email = mail.outbox[0] | 28 email = mail.outbox[0] |
29 self.assertEqual(len(email.recipients()), 1) | 29 self.assertEqual(len(email.recipients()), 1) |
30 self.assertEqual(email.from_email, post_data['email']) | 30 self.assertEqual(email.extra_headers['Reply-To'], post_data['email']) |
31 self.assertEqual(email.from_email, 'no_reply@example.com') | |
31 self.assertEqual(email.recipients()[0], 'admin@surfguitar101.com') | 32 self.assertEqual(email.recipients()[0], 'admin@surfguitar101.com') |
32 self.assertTrue(post_data['subject'] in email.subject) | 33 self.assertTrue(post_data['subject'] in email.subject) |
33 msg = email.message().as_string() | 34 msg = email.message().as_string() |
34 self.assertTrue(post_data['name'] in msg) | 35 self.assertTrue(post_data['name'] in msg) |
35 self.assertTrue(post_data['email'] in msg) | 36 self.assertTrue(post_data['email'] in msg) |