Esempio n. 1
0
 def test_send_mail_call(self, mock_send):
     send_policy_document_update_notification(self.user.id, 'both')
     args, kwargs = mock_send.call_args
     self.assertEqual(args[2], settings.DEFAULT_FROM_EMAIL)
     self.assertEqual(args[3][0], self.user.email)
     self.assertEqual(len(args[3]), 1)
     self.assertFalse(kwargs.get("fail_silently"))
Esempio n. 2
0
 def test_send_mail_call(self, mock_send):
     send_policy_document_update_notification(self.user.id, 'both')
     args, kwargs = mock_send.call_args
     self.assertEqual(args[2], settings.DEFAULT_FROM_EMAIL)
     self.assertEqual(args[3][0], self.user.email)
     self.assertEqual(len(args[3]), 1)
     self.assertFalse(kwargs.get("fail_silently"))
Esempio n. 3
0
 def test_docs_bad_value(self):
     with self.assertRaises(ValueError):
         send_policy_document_update_notification(self.user.id, 'foobar')
Esempio n. 4
0
 def test_docs_good_values(self, docs):
     send_policy_document_update_notification(self.user.id, docs)
Esempio n. 5
0
 def test_docs_bad_value(self):
     with self.assertRaises(ValueError):
         send_policy_document_update_notification(self.user.id, 'foobar')
Esempio n. 6
0
 def test_docs_good_values(self, docs):
     send_policy_document_update_notification(self.user.id, docs)