Commit 095b4beb authored by Romain Courteaud's avatar Romain Courteaud

slapos_slap_tool: test

parent 36df6014
......@@ -3246,7 +3246,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
compute_node_id = 'Foo Compute Node'
compute_node_reference = 'live_comp_%s' % self.generateNewId()
self.portal.REQUEST.set('compute_node_reference', compute_node_reference)
response = self.portal_slap.requestComputer(compute_node_id)
response = self.portal_slap.requestComputer(compute_node_id, self.project.getReference())
got_xml = etree.tostring(etree.fromstring(response),
pretty_print=True, encoding="UTF-8", xml_declaration=True)
expected_xml = """\
......@@ -3266,7 +3266,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
self.assertEqual(expected_xml, got_xml,
'\n'.join([q for q in difflib.unified_diff(expected_xml.split('\n'), got_xml.split('\n'))]))
self.assertRequestComputeNodeSimulator((), {'compute_node_title': compute_node_id})
self.assertRequestComputeNodeSimulator((), {'compute_node_title': compute_node_id, 'project_reference': self.project.getReference()})
finally:
if os.path.exists(self.compute_node_request_compute_node_simulator):
os.unlink(self.compute_node_request_compute_node_simulator)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment