From 69baddc1c8afa069aefc71a3744a8fdee8f50212 Mon Sep 17 00:00:00 2001 From: Miguel Caballer Date: Thu, 6 Jun 2024 09:03:56 +0200 Subject: [PATCH] Improve tests --- test/unit/REST.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/unit/REST.py b/test/unit/REST.py index 81630f5d..2be21635 100755 --- a/test/unit/REST.py +++ b/test/unit/REST.py @@ -207,6 +207,7 @@ def test_CreateInfrastructure(self, get_infrastructure, CreateInfrastructure): res = self.client.post('/infrastructures', headers=headers, data=BytesIO(b"radl")) self.assertEqual(res.text, "http://localhost/infrastructures/1") + self.assertEqual(res.headers['InfID'],"1") res = self.client.post('/infrastructures?async=yes', headers=headers, data=BytesIO(b"radl")) self.assertEqual(res.text, "http://localhost/infrastructures/1") @@ -340,6 +341,7 @@ def test_AddResource(self, get_infrastructure, AddResource): res = self.client.post('/infrastructures/1?context=yes', headers=headers, data=BytesIO(b"radl")) self.assertEqual(res.text, "http://localhost/infrastructures/1/vms/1") + self.assertEqual(res.headers['InfID'],"1") headers["Content-Type"] = "application/json" res = self.client.post('/infrastructures/1', headers=headers, @@ -457,6 +459,7 @@ def test_Reconfigure(self, Reconfigure): res = self.client.put('/infrastructures/1/reconfigure?vmlist=1,2', headers=headers, data=BytesIO(b"radl")) self.assertEqual(res.text, "") + self.assertEqual(res.headers['InfID'],"1") headers["Content-Type"] = "application/json" res = self.client.put('/infrastructures/1/reconfigure?vmlist=1,2',