# Path: cloudify_resources/tasks.py
# def _refresh_source_and_target_runtime_props(ctx, **kwargs):
# def _update_source_and_target_runtime_props(ctx, **kwargs):
# def create_list(ctx, **kwargs):
# def create_list_item(ctx, **kwargs):
# def delete_list_item(ctx, **kwargs):
# def delete_list(ctx, **kwargs):
# def reserve_list_item(ctx, **kwargs):
# def return_list_item(ctx, **kwargs):
# 
# Path: cloudify_resources/constants.py
# RESOURCES_LIST_PROPERTY = 'resource_config'
# 
# FREE_RESOURCES_LIST_PROPERTY = 'free_resources'
# 
# RESERVATIONS_PROPERTY = 'reservations'
# 
# SINGLE_RESERVATION_PROPERTY = 'reservation'


import unittest
from cloudify.state import current_ctx
from cloudify.mocks import (
    MockCloudifyContext,
    MockNodeContext,
    MockNodeInstanceContext,
    MockRelationshipContext,
    MockRelationshipSubjectContext
)
from cloudify_resources import tasks
from cloudify_resources.constants import (
    RESOURCES_LIST_PROPERTY,
    FREE_RESOURCES_LIST_PROPERTY,
    RESERVATIONS_PROPERTY,
    SINGLE_RESERVATION_PROPERTY
)
########
# Copyright (c) 2014-2019 Cloudify Platform Ltd. All rights reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#        http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.




class TestTasks(unittest.TestCase):

    def _mock_resource_list_ctx(self):
        properties = {
            'resource_config': [
                '10.0.1.0/24',

# Path: cloudify_resources/tasks.py
# def _refresh_source_and_target_runtime_props(ctx, **kwargs):
# def _update_source_and_target_runtime_props(ctx, **kwargs):
# def create_list(ctx, **kwargs):
# def create_list_item(ctx, **kwargs):
# def delete_list_item(ctx, **kwargs):
# def delete_list(ctx, **kwargs):
# def reserve_list_item(ctx, **kwargs):
# def return_list_item(ctx, **kwargs):
# 
# Path: cloudify_resources/constants.py
# RESOURCES_LIST_PROPERTY = 'resource_config'
# 
# FREE_RESOURCES_LIST_PROPERTY = 'free_resources'
# 
# RESERVATIONS_PROPERTY = 'reservations'
# 
# SINGLE_RESERVATION_PROPERTY = 'reservation'


# Path: cloudify_resources/tests/test_tasks.py
import unittest
from cloudify.state import current_ctx
from cloudify.mocks import (
    MockCloudifyContext,
    MockNodeContext,
    MockNodeInstanceContext,
    MockRelationshipContext,
    MockRelationshipSubjectContext
)
from cloudify_resources import tasks
from cloudify_resources.constants import (
    RESOURCES_LIST_PROPERTY,
    FREE_RESOURCES_LIST_PROPERTY,
    RESERVATIONS_PROPERTY,
    SINGLE_RESERVATION_PROPERTY
)

########
# Copyright (c) 2014-2019 Cloudify Platform Ltd. All rights reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#        http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.




class TestTasks(unittest.TestCase):

    def _mock_resource_list_ctx(self):
        properties = {
            'resource_config': [
                '10.0.1.0/24',

                '10.0.2.0/24',