예제 #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"))
예제 #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"))
예제 #3
0
 def test_docs_bad_value(self):
     with self.assertRaises(ValueError):
         send_policy_document_update_notification(self.user.id, 'foobar')
예제 #4
0
 def test_docs_good_values(self, docs):
     send_policy_document_update_notification(self.user.id, docs)
예제 #5
0
 def test_docs_bad_value(self):
     with self.assertRaises(ValueError):
         send_policy_document_update_notification(self.user.id, 'foobar')
예제 #6
0
 def test_docs_good_values(self, docs):
     send_policy_document_update_notification(self.user.id, docs)