From 36df601429c932728ef4676016e2cdbe2491677c Mon Sep 17 00:00:00 2001 From: Romain Courteaud <romain@nexedi.com> Date: Fri, 6 Jan 2023 10:04:59 +0000 Subject: [PATCH] slapos_slap_tool: project reference --- .../test.erp5.testSlapOSSlapTool.py | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/master/bt5/slapos_slap_tool/TestTemplateItem/portal_components/test.erp5.testSlapOSSlapTool.py b/master/bt5/slapos_slap_tool/TestTemplateItem/portal_components/test.erp5.testSlapOSSlapTool.py index 299e0e49d..a67a03ae7 100644 --- a/master/bt5/slapos_slap_tool/TestTemplateItem/portal_components/test.erp5.testSlapOSSlapTool.py +++ b/master/bt5/slapos_slap_tool/TestTemplateItem/portal_components/test.erp5.testSlapOSSlapTool.py @@ -1995,6 +1995,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin): filter_xml='<marshal><dictionary id="i2"/></marshal>', state='<marshal><string>started</string></marshal>', shared_xml='<marshal><bool>1</bool></marshal>', + project_reference=self.project.getReference() ) self.assertEqual(408, response.status) self.assertEqual('private', @@ -2006,7 +2007,9 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin): 'state': 'started', 'sla_xml': "<?xml version='1.0' encoding='utf-8'?>\n<instance/>\n", 'software_type': 'req_type', - 'shared': True}) + 'shared': True, + 'project_reference': self.project.getReference() + }) finally: if os.path.exists(self.instance_request_simulator): os.unlink(self.instance_request_simulator) @@ -2030,6 +2033,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin): filter_xml='<marshal><dictionary id="i2"/></marshal>', state='<marshal><string>started</string></marshal>', shared_xml='<marshal><bool>0</bool></marshal>', + project_reference=self.project.getReference() ) self.assertEqual(408, response.status) self.assertEqual('private', @@ -2041,7 +2045,9 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin): 'state': 'started', 'sla_xml': "<?xml version='1.0' encoding='utf-8'?>\n<instance/>\n", 'software_type': 'req_type', - 'shared': False}) + 'shared': False, + 'project_reference': self.project.getReference() + }) finally: if os.path.exists(self.instance_request_simulator): os.unlink(self.instance_request_simulator) @@ -2065,6 +2071,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin): filter_xml='<marshal><dictionary id="i2"/></marshal>', state='<marshal><string>started</string></marshal>', shared_xml='<marshal><bool>0</bool></marshal>', + project_reference=self.project.getReference() ) self.assertEqual(408, response.status) self.assertEqual('private', @@ -2076,7 +2083,9 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin): 'state': 'stopped', 'sla_xml': "<?xml version='1.0' encoding='utf-8'?>\n<instance/>\n", 'software_type': 'req_type', - 'shared': False}) + 'shared': False, + 'project_reference': self.project.getReference() + }) finally: if os.path.exists(self.instance_request_simulator): os.unlink(self.instance_request_simulator) @@ -3052,6 +3061,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin): filter_xml='<marshal><dictionary id="i2"/></marshal>', state='<marshal><string>started</string></marshal>', shared_xml='<marshal><bool>1</bool></marshal>', + project_reference=self.project.getReference() ) self.assertEqual(408, response.status) self.assertEqual('private', @@ -3063,7 +3073,9 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin): 'state': 'started', 'sla_xml': "<?xml version='1.0' encoding='utf-8'?>\n<instance/>\n", 'software_type': 'req_type', - 'shared': True}) + 'shared': True, + 'project_reference': self.project.getReference() + }) finally: if os.path.exists(self.instance_request_simulator): os.unlink(self.instance_request_simulator) @@ -3082,6 +3094,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin): filter_xml='<marshal><dictionary id="i2"/></marshal>', state='<marshal><string>started</string></marshal>', shared_xml='<marshal><bool>0</bool></marshal>', + project_reference=self.project.getReference() ) self.assertEqual(408, response.status) self.assertEqual('private', @@ -3093,7 +3106,9 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin): 'state': 'started', 'sla_xml': "<?xml version='1.0' encoding='utf-8'?>\n<instance/>\n", 'software_type': 'req_type', - 'shared': False}) + 'shared': False, + 'project_reference': self.project.getReference() + }) finally: if os.path.exists(self.instance_request_simulator): os.unlink(self.instance_request_simulator) -- 2.30.9