# Path: awslimitchecker/services/directoryservice.py
# class _DirectoryserviceService(_AwsService):
# 
#     service_name = 'Directory Service'
#     api_name = 'ds'  # AWS API name to connect to (boto3.client)
# 
#     def find_usage(self):
#         """
#         Determine the current usage for each limit of this service,
#         and update corresponding Limit via
#         :py:meth:`~.AwsLimit._add_current_usage`.
#         """
#         logger.debug("Checking usage for service %s", self.service_name)
#         self.connect()
#         for lim in self.limits.values():
#             lim._reset_usage()
#         resp = self.conn.get_directory_limits()
#         directory_limits = resp['DirectoryLimits']
#         self.limits['CloudOnlyDirectories']._add_current_usage(
#             directory_limits['CloudOnlyDirectoriesCurrentCount'],
#             aws_type='AWS::DirectoryService'
#         )
#         self.limits['CloudOnlyMicrosoftAD']._add_current_usage(
#             directory_limits['CloudOnlyMicrosoftADCurrentCount'],
#             aws_type='AWS::DirectoryService'
#         )
#         self.limits['ConnectedDirectories']._add_current_usage(
#             directory_limits['ConnectedDirectoriesCurrentCount'],
#             aws_type='AWS::DirectoryService'
#         )
#         self._have_usage = True
#         logger.debug("Done checking usage.")
# 
#     def get_limits(self):
#         """
#         Return all known limits for this service, as a dict of their names
#         to :py:class:`~.AwsLimit` objects.
# 
#         :returns: dict of limit names to :py:class:`~.AwsLimit` objects
#         :rtype: dict
#         """
#         if self.limits != {}:
#             return self.limits
#         limits = {}
#         limits['CloudOnlyDirectories'] = AwsLimit(
#             'CloudOnlyDirectories',
#             self,
#             10,
#             self.warning_threshold,
#             self.critical_threshold,
#             limit_type='AWS::DirectoryService::CloudOnly',
#         )
#         limits['CloudOnlyMicrosoftAD'] = AwsLimit(
#             'CloudOnlyMicrosoftAD',
#             self,
#             10,
#             self.warning_threshold,
#             self.critical_threshold,
#             limit_type='AWS::DirectoryService::MicrosoftAD',
#         )
#         limits['ConnectedDirectories'] = AwsLimit(
#             'ConnectedDirectories',
#             self,
#             10,
#             self.warning_threshold,
#             self.critical_threshold,
#             limit_type='AWS::DirectoryService::Connected',
#         )
#         self.limits = limits
#         return limits
# 
#     def _update_limits_from_api(self):
#         """
#         Call the service's API action to retrieve limit/quota information, and
#         update AwsLimit objects in ``self.limits`` with this information.
#         """
#         logger.debug('Setting DirectoryService limits from API')
#         self.connect()
#         resp = self.conn.get_directory_limits()
#         directory_limits = resp['DirectoryLimits']
#         self.limits['CloudOnlyDirectories']._set_api_limit(
#             directory_limits['CloudOnlyDirectoriesLimit']
#         )
#         self.limits['CloudOnlyMicrosoftAD']._set_api_limit(
#             directory_limits['CloudOnlyMicrosoftADLimit']
#         )
#         self.limits['ConnectedDirectories']._set_api_limit(
#             directory_limits['ConnectedDirectoriesLimit']
#         )
# 
#     def required_iam_permissions(self):
#         """
#         Return a list of IAM Actions required for this Service to function
#         properly. All Actions will be shown with an Effect of "Allow"
#         and a Resource of "*".
# 
#         :returns: list of IAM Action strings
#         :rtype: list
#         """
#         return [
#             "ds:GetDirectoryLimits",
#         ]


import sys
from awslimitchecker.services.directoryservice import _DirectoryserviceService
    from mock import patch, call, Mock
    from unittest.mock import patch, call, Mock
While not legally required, I sincerely request that anyone who finds
bugs please submit them at <https://github.com/jantman/awslimitchecker> or
to me via email, and that you send any contributions or improvements
either as a pull request on GitHub, or to me via email.
################################################################################

AUTHORS:
Di Zou <zou@pythian.com>
Jason Antman <jason@jasonantman.com> <http://www.jasonantman.com>
################################################################################
"""


# https://code.google.com/p/mock/issues/detail?id=249
# py>=3.4 should use unittest.mock not the mock package on pypi
if (
        sys.version_info[0] < 3 or
        sys.version_info[0] == 3 and sys.version_info[1] < 4
):
else:


pbm = 'awslimitchecker.services.directoryservice'  # module patch base
pb = '%s._DirectoryserviceService' % pbm  # class patch pase


class Test_DirectoryserviceService(object):

    def test_init(self):
        """test __init__()"""

# Path: awslimitchecker/services/directoryservice.py
# class _DirectoryserviceService(_AwsService):
# 
#     service_name = 'Directory Service'
#     api_name = 'ds'  # AWS API name to connect to (boto3.client)
# 
#     def find_usage(self):
#         """
#         Determine the current usage for each limit of this service,
#         and update corresponding Limit via
#         :py:meth:`~.AwsLimit._add_current_usage`.
#         """
#         logger.debug("Checking usage for service %s", self.service_name)
#         self.connect()
#         for lim in self.limits.values():
#             lim._reset_usage()
#         resp = self.conn.get_directory_limits()
#         directory_limits = resp['DirectoryLimits']
#         self.limits['CloudOnlyDirectories']._add_current_usage(
#             directory_limits['CloudOnlyDirectoriesCurrentCount'],
#             aws_type='AWS::DirectoryService'
#         )
#         self.limits['CloudOnlyMicrosoftAD']._add_current_usage(
#             directory_limits['CloudOnlyMicrosoftADCurrentCount'],
#             aws_type='AWS::DirectoryService'
#         )
#         self.limits['ConnectedDirectories']._add_current_usage(
#             directory_limits['ConnectedDirectoriesCurrentCount'],
#             aws_type='AWS::DirectoryService'
#         )
#         self._have_usage = True
#         logger.debug("Done checking usage.")
# 
#     def get_limits(self):
#         """
#         Return all known limits for this service, as a dict of their names
#         to :py:class:`~.AwsLimit` objects.
# 
#         :returns: dict of limit names to :py:class:`~.AwsLimit` objects
#         :rtype: dict
#         """
#         if self.limits != {}:
#             return self.limits
#         limits = {}
#         limits['CloudOnlyDirectories'] = AwsLimit(
#             'CloudOnlyDirectories',
#             self,
#             10,
#             self.warning_threshold,
#             self.critical_threshold,
#             limit_type='AWS::DirectoryService::CloudOnly',
#         )
#         limits['CloudOnlyMicrosoftAD'] = AwsLimit(
#             'CloudOnlyMicrosoftAD',
#             self,
#             10,
#             self.warning_threshold,
#             self.critical_threshold,
#             limit_type='AWS::DirectoryService::MicrosoftAD',
#         )
#         limits['ConnectedDirectories'] = AwsLimit(
#             'ConnectedDirectories',
#             self,
#             10,
#             self.warning_threshold,
#             self.critical_threshold,
#             limit_type='AWS::DirectoryService::Connected',
#         )
#         self.limits = limits
#         return limits
# 
#     def _update_limits_from_api(self):
#         """
#         Call the service's API action to retrieve limit/quota information, and
#         update AwsLimit objects in ``self.limits`` with this information.
#         """
#         logger.debug('Setting DirectoryService limits from API')
#         self.connect()
#         resp = self.conn.get_directory_limits()
#         directory_limits = resp['DirectoryLimits']
#         self.limits['CloudOnlyDirectories']._set_api_limit(
#             directory_limits['CloudOnlyDirectoriesLimit']
#         )
#         self.limits['CloudOnlyMicrosoftAD']._set_api_limit(
#             directory_limits['CloudOnlyMicrosoftADLimit']
#         )
#         self.limits['ConnectedDirectories']._set_api_limit(
#             directory_limits['ConnectedDirectoriesLimit']
#         )
# 
#     def required_iam_permissions(self):
#         """
#         Return a list of IAM Actions required for this Service to function
#         properly. All Actions will be shown with an Effect of "Allow"
#         and a Resource of "*".
# 
#         :returns: list of IAM Action strings
#         :rtype: list
#         """
#         return [
#             "ds:GetDirectoryLimits",
#         ]


# Path: awslimitchecker/tests/services/test_directoryservice.py
import sys
from awslimitchecker.services.directoryservice import _DirectoryserviceService
    from mock import patch, call, Mock
    from unittest.mock import patch, call, Mock

While not legally required, I sincerely request that anyone who finds
bugs please submit them at <https://github.com/jantman/awslimitchecker> or
to me via email, and that you send any contributions or improvements
either as a pull request on GitHub, or to me via email.
################################################################################

AUTHORS:
Di Zou <zou@pythian.com>
Jason Antman <jason@jasonantman.com> <http://www.jasonantman.com>
################################################################################
"""


# https://code.google.com/p/mock/issues/detail?id=249
# py>=3.4 should use unittest.mock not the mock package on pypi
if (
        sys.version_info[0] < 3 or
        sys.version_info[0] == 3 and sys.version_info[1] < 4
):
else:


pbm = 'awslimitchecker.services.directoryservice'  # module patch base
pb = '%s._DirectoryserviceService' % pbm  # class patch pase


class Test_DirectoryserviceService(object):

    def test_init(self):
        """test __init__()"""

        cls = _DirectoryserviceService(21, 43, {}, None)