예제 #1
0
def delete( request, id ):
    #TODO should require a POST
    email_uri = mail_api.id2uri(id)
    mail_api.delete_email(email_uri)
    return http.HttpResponseRedirect(reverse('mail_schedule'))
예제 #2
0
 def test_delete_email(self):
     email = mail_model.save_email(*self.EMAIL_PARAMS)
     email = mail_model.save_email(*self.EMAIL_PARAMS)
     mail_model.delete_email(email['uri'])
     with self.assertRaises(Exception):
         email2 = mail_model.get_email(email['uri'])
예제 #3
0
def delete(request, id):
    #TODO should require a POST
    email_uri = mail_api.id2uri(id)
    mail_api.delete_email(email_uri)
    return http.HttpResponseRedirect(reverse('mail_schedule'))
예제 #4
0
 def test_delete_email(self):
     email = mail_model.save_email(*self.EMAIL_PARAMS)
     email = mail_model.save_email(*self.EMAIL_PARAMS)
     mail_model.delete_email(email['uri'])
     with self.assertRaises(Exception):
         email2 = mail_model.get_email(email['uri'])