# Path: acos_client/v30/vrrpa/vrid.py
# class VRID(base.BaseV30):
#     def __init__(self, client):
#     def blade(self):
#     def get(self, vrid_val):
#     def exists(self, vrid_val):
#     def _build_params(self, vrid_val, threshold=None, disable=None, floating_ips=[],
#                       is_partition=False):
#     def create(self, vrid_val, threshold=None, disable=None, floating_ips=[], is_partition=False):
#     def update(self, vrid_val, threshold=None, disable=None, floating_ips=[], is_partition=False):
#     def delete(self, vrid_val):


    import unittest
    import mock
    import unittest2 as unittest
    from unittest import mock
from acos_client.v30.vrrpa import vrid

from __future__ import absolute_import
from __future__ import unicode_literals

try:
except ImportError:



class TestVRID(unittest.TestCase):
    def setUp(self):
        self.client = mock.MagicMock()
        self.target = vrid.VRID(self.client)
        self.url_prefix = "/axapi/v3/vrrp-a/vrid/"

    def expected_payload(self, vrid_val, threshold=1, disable=0, is_partition=None):
        rv = {
            'vrid': {
                'vrid-val': vrid_val,
                'preempt-mode': {
                    'threshold': threshold,
                    'disable': disable
                }
            }
        }
        return rv

    def test_vrid_get(self):
        self.target.get(0)
        self.client.http.request.assert_called_with("GET", self.url_prefix + '0', {}, mock.ANY,

# Path: acos_client/v30/vrrpa/vrid.py
# class VRID(base.BaseV30):
#     def __init__(self, client):
#     def blade(self):
#     def get(self, vrid_val):
#     def exists(self, vrid_val):
#     def _build_params(self, vrid_val, threshold=None, disable=None, floating_ips=[],
#                       is_partition=False):
#     def create(self, vrid_val, threshold=None, disable=None, floating_ips=[], is_partition=False):
#     def update(self, vrid_val, threshold=None, disable=None, floating_ips=[], is_partition=False):
#     def delete(self, vrid_val):


# Path: acos_client/tests/unit/v30/test_vrrpa.py
    import unittest
    import mock
    import unittest2 as unittest
    from unittest import mock
from acos_client.v30.vrrpa import vrid


from __future__ import absolute_import
from __future__ import unicode_literals

try:
except ImportError:



class TestVRID(unittest.TestCase):
    def setUp(self):
        self.client = mock.MagicMock()
        self.target = vrid.VRID(self.client)
        self.url_prefix = "/axapi/v3/vrrp-a/vrid/"

    def expected_payload(self, vrid_val, threshold=1, disable=0, is_partition=None):
        rv = {
            'vrid': {
                'vrid-val': vrid_val,
                'preempt-mode': {
                    'threshold': threshold,
                    'disable': disable
                }
            }
        }
        return rv

    def test_vrid_get(self):
        self.target.get(0)
        self.client.http.request.assert_called_with("GET", self.url_prefix + '0', {}, mock.ANY,

                                                    axapi_args=None, max_retries=None, timeout=mock.ANY)