Exemplo n.º 1
0
 def DELETE(self, image_id=''):
     """
     This function deletes an image identified by the provided image_id
     """
     auth_token = web.ctx.get('environ').get('HTTP_X_AUTH_TOKEN', None)
     auth_tenant_id = web.ctx.get('environ').get('HTTP_X_AUTH_TENANT_ID', None)
     image.delete_image(auth_token, image_id)
     
     return None
Exemplo n.º 2
0
def delete_image():
    if request.method == 'POST':
        try:
            i = int(request.args.get('num'))
        except:
            i = -1
    else:
        i = -1

    image.delete_image(i)
    return redirect("./")
Exemplo n.º 3
0
 def test_9delete_image(self):
     data = image.delete_image(token, image_id=random_image_id)
     self.assertIsNone(data, 'This should not return any data')