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'))
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'])
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'))