Exemplo n.º 1
0
 def test_return_new_uinq_id(self, mock_find_unique_id):
     resources_section = etree.fromstring('''<resources/>''')
     mock_find_unique_id.side_effect = (
         lambda resources_section, id: "{0}-n".format(id))
     self.assertEqual(
         "booth-some-name-ip-n",
         booth_resource.create_resource_id(resources_section, "some-name",
                                           "ip"))
Exemplo n.º 2
0
 def test_return_new_uinq_id(self, mock_find_unique_id):
     resources_section = etree.fromstring('''<resources/>''')
     mock_find_unique_id.side_effect = (
         lambda resources_section, id: "{0}-n".format(id)
     )
     self.assertEqual(
         "booth-some-name-ip-n",
         booth_resource.create_resource_id(
             resources_section, "some-name", "ip"
         )
     )