From 577c56ebaa2556cebcf81160307dabde081e4762 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Fri, 6 Sep 2019 16:06:50 -0700 Subject: [PATCH] tests: Add test for /compose/uploads/delete Test deleting an upload from a compose. --- tests/pylorax/test_server.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/pylorax/test_server.py b/tests/pylorax/test_server.py index 44e819f7..9f4fb4b0 100644 --- a/tests/pylorax/test_server.py +++ b/tests/pylorax/test_server.py @@ -3692,6 +3692,13 @@ class ServerAPIV1TestCase(unittest.TestCase): self.assertEqual(data["status"], True, "Failed to schedule upload: %s" % data) self.assertTrue(len(data["upload_id"]) > 0) + # Delete this upload from this compose + resp = self.server.delete("/api/v1/compose/uploads/delete/%s/%s" % (build_id, data["upload_id"])) + data = json.loads(resp.data) + self.assertNotEqual(data, None) + self.assertEqual(data["status"], True, "Failed to delete upload: %s" % data) + self.assertTrue(len(data["upload_id"]) > 0) + def test_upload_06_providers_delete(self): """Delete a profile from a provider""" # /api/v1/upload/providers/delete/provider/profile