class SasLogicalJbodAttachmentsTest(unittest.TestCase):
    def setUp(self):
        self.host = '127.0.0.1'
        self.connection = connection(self.host)
        self._sas_logical_jbod_attachments = SasLogicalJbodAttachments(self.connection)

    @mock.patch.object(ResourceClient, 'get_all')
    def test_get_all_called_once(self, mock_get_all):
        filter = 'name=TestName'
        sort = 'name:ascending'

        self._sas_logical_jbod_attachments.get_all(2, 500, filter, sort)

    @mock.patch.object(ResourceClient, 'get_by')
    def test_get_by_called_once(self, mock_get_by):
        self._sas_logical_jbod_attachments.get_by('name', 'SAS Logical JBOD Attachment Name')

        mock_get_by.assert_called_once_with('name', 'SAS Logical JBOD Attachment Name')

    @mock.patch.object(ResourceClient, 'get')
    def test_get_called_once(self, mock_get):
        self._sas_logical_jbod_attachments.get('3518be0e-17c1-4189-8f81-83f3724f6155')

        mock_get.assert_called_once_with('3518be0e-17c1-4189-8f81-83f3724f6155')

    @mock.patch.object(ResourceClient, 'get')
    def test_get_with_uri_called_once(self, mock_get):
        uri = '/rest/sas-logical-jbods-attachments/3518be0e-17c1-4189-8f81-83f3724f6155'
        self._sas_logical_jbod_attachments.get(uri)

        mock_get.assert_called_once_with(uri)
    def sas_logical_jbod_attachments(self):
        """
        Gets the SAS Logical JBOD Attachments client.

        Returns:
            SasLogicalJbodAttachments:
        """
        if not self.__sas_logical_jbod_attachments:
            self.__sas_logical_jbod_attachments = SasLogicalJbodAttachments(self.__connection)
        return self.__sas_logical_jbod_attachments
class SasLogicalJbodAttachmentsTest(unittest.TestCase):
    def setUp(self):
        self.host = '127.0.0.1'
        self.connection = connection(self.host)
        self._sas_logical_jbod_attachments = SasLogicalJbodAttachments(
            self.connection)

    @mock.patch.object(ResourceClient, 'get_all')
    def test_get_all_called_once(self, mock_get_all):
        filter = 'name=TestName'
        sort = 'name:ascending'

        self._sas_logical_jbod_attachments.get_all(2, 500, filter, sort)

    @mock.patch.object(ResourceClient, 'get_by')
    def test_get_by_called_once(self, mock_get_by):
        self._sas_logical_jbod_attachments.get_by(
            'name', 'SAS Logical JBOD Attachment Name')

        mock_get_by.assert_called_once_with(
            'name', 'SAS Logical JBOD Attachment Name')

    @mock.patch.object(ResourceClient, 'get')
    def test_get_called_once(self, mock_get):
        self._sas_logical_jbod_attachments.get(
            '3518be0e-17c1-4189-8f81-83f3724f6155')

        mock_get.assert_called_once_with(
            '3518be0e-17c1-4189-8f81-83f3724f6155')

    @mock.patch.object(ResourceClient, 'get')
    def test_get_with_uri_called_once(self, mock_get):
        uri = '/rest/sas-logical-jbods-attachments/3518be0e-17c1-4189-8f81-83f3724f6155'
        self._sas_logical_jbod_attachments.get(uri)

        mock_get.assert_called_once_with(uri)
 def setUp(self):
     self.host = '127.0.0.1'
     self.connection = connection(self.host)
     self._sas_logical_jbod_attachments = SasLogicalJbodAttachments(self.connection)
 def setUp(self):
     self.host = '127.0.0.1'
     self.connection = connection(self.host)
     self._sas_logical_jbod_attachments = SasLogicalJbodAttachments(
         self.connection)