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"))
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" ) )