<commit_before># -*- coding: utf-8 -*-
'''
    :codeauthor: :email:`<NAME> <<EMAIL>>`
'''

# Import Python Libs
from __future__ import absolute_import

# Import Salt Testing Libs
from salttesting import TestCase, skipIf
from salttesting.mock import (
    patch,
    NO_MOCK,
    NO_MOCK_REASON
)

from salttesting.helpers import ensure_in_syspath

ensure_in_syspath('../../')

# Import Salt Libs
from salt.modules import neutron


class MockNeutron(object):
    """
    Mock of neutron
    """
    @staticmethod
    def get_quotas_tenant():
        """
        Mock of get_quotas_tenant method
        """
        return True

    @staticmethod
    def list_quotas():
        """
        Mock of list_quotas method
        """
        return True

    @staticmethod
    def show_quota(tenant_id):
        """
        Mock of show_quota method
        """
        return tenant_id

    @staticmethod
    def update_quota(tenant_id, subnet, router, network,
                     floatingip, port, security_group,
                     security_group_rule):
        """
        Mock of update_quota method
        """
        return (tenant_id, subnet, router, network, floatingip, port,
                security_group, security_group_rule)

    @staticmethod
    def delete_quota(tenant_id):
        """
        Mock of delete_quota method
        """
        return tenant_id

    @staticmethod
    def list_extensions():
        """
        Mock of list_extensions method
        """
        return True

    @staticmethod
    def list_ports():
        """
        Mock of list_ports method
        """
        return True

    @staticmethod
    def show_port(port):
        """
        Mock of show_port method
        """
        return port

    @staticmethod
    def create_port(name, network, device_id, admin_state_up):
        """
        Mock of create_port method
        """
        return (name, network, device_id, admin_state_up)

    @staticmethod
    def update_port(port, name, admin_state_up):
        """
        Mock of update_port method
        """
        return (port, name, admin_state_up)

    @staticmethod
    def delete_port(port):
        """
        Mock of delete_port method
        """
        return port

    @staticmethod
    def list_networks():
        """
        Mock of list_networks method
        """
        return True

    @staticmethod
    def show_network(network):
        """
        Mock of show_network method
        """
        return network

    @staticmethod
    def create_network(name, router_ext):
        """
        Mock of create_network method
        """
        return (name, router_ext)

    @staticmethod
    def update_network(network, name):
        """
        Mock of update_network method<commit_msg>forgot the unit test. or at least couldn't find it originally.<commit_after># -*- coding: utf-8 -*-
'''
    :codeauthor: :email:`<NAME> <<EMAIL>>`
'''

# Import Python Libs
from __future__ import absolute_import

# Import Salt Testing Libs
from salttesting import TestCase, skipIf
from salttesting.mock import (
    patch,
    NO_MOCK,
    NO_MOCK_REASON
)

from salttesting.helpers import ensure_in_syspath

ensure_in_syspath('../../')

# Import Salt Libs
from salt.modules import neutron


class MockNeutron(object):
    """
    Mock of neutron
    """
    @staticmethod
    def get_quotas_tenant():
        """
        Mock of get_quotas_tenant method
        """
        return True

    @staticmethod
    def list_quotas():
        """
        Mock of list_quotas method
        """
        return True

    @staticmethod
    def show_quota(tenant_id):
        """
        Mock of show_quota method
        """
        return tenant_id

    @staticmethod
    def update_quota(tenant_id, subnet, router, network,
                     floatingip, port, security_group,
                     security_group_rule):
        """
        Mock of update_quota method
        """
        return (tenant_id, subnet, router, network, floatingip, port,
                security_group, security_group_rule)

    @staticmethod
    def delete_quota(tenant_id):
        """
        Mock of delete_quota method
        """
        return tenant_id

    @staticmethod
    def list_extensions():
        """
        Mock of list_extensions method
        """
        return True

    @staticmethod
    def list_ports():
        """
        Mock of list_ports method
        """
        return True

    @staticmethod
    def show_port(port):
        """
        Mock of show_port method
        """
        return port

    @staticmethod
    def create_port(name, network, device_id, admin_state_up):
        """
        Mock of create_port method
        """
        return (name, network, device_id, admin_state_up)

    @staticmethod
    def update_port(port, name, admin_state_up):
        """
        Mock of update_port method
        """
        return (port, name, admin_state_up)

    @staticmethod
    def delete_port(port):
        """
        Mock of delete_port method
        """
        return port

    @staticmethod
    def list_networks():
        """
        Mock of list_networks method
        """
        return True

    @staticmethod
    def show_network(network):
        """
        Mock of show_network method
        """
        return network

    @staticmethod
    def create_network(name, admin_state_up, router_ext, network_type, physical_network, segmentation_id, shared):
        """
        Mock of create_network method
        """
        return (name, admin_state_up, router_ext, network_type, physical_network, segmentation_id, shared)

    @staticmethod
    def update_network(network, name):
        """
        Mock of update_network method
{'fraction_non_alphanumeric': 0.0866004530405994, 'fraction_numerical': 0.0003484927687750479, 'mean_word_length': 1.9880270692347735, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '346545', 'n_tokens_mistral': 1633, 'n_tokens_neox': 1597, 'n_words': 429}