def test_create_id_from_resource_set_list(self, mock_find_id): resource_set_list = [{"ids": ["A", "B"]}, {"ids": ["C"]}] mock_find_id.return_value = "some_id" self.assertEqual( "some_id", constraint.create_id("cib", "PREFIX", resource_set_list), ) mock_find_id.assert_called_once_with("cib", "PREFIX_set_AABBCC")
def test_create_id_from_resource_set_list(self, mock_find_id, mock_extract): mock_extract.return_value = [["A", "B"], ["C"]] mock_find_id.return_value = "some_id" self.assertEqual( "some_id", constraint.create_id("cib", "PREFIX", "resource_set_list")) mock_extract.assert_called_once_with("resource_set_list") mock_find_id.assert_called_once_with("cib", "pcs_PREFIX_set_A_B_set_C")
def test_create_id_from_resource_set_list(self, mock_find_id, mock_extract): mock_extract.return_value = [["A", "B"], ["C"]] mock_find_id.return_value = "some_id" self.assertEqual( "some_id", constraint.create_id("cib", "PREFIX", "resource_set_list") ) mock_extract.assert_called_once_with("resource_set_list") mock_find_id.assert_called_once_with("cib", "pcs_PREFIX_set_A_B_set_C")