# Path: dftimewolf/lib/state.py
# T = TypeVar("T", bound="interface.AttributeContainer")  # pylint: disable=invalid-name,line-too-long
# NEW_ISSUE_URL = 'https://github.com/log2timeline/dftimewolf/issues/new'
# class DFTimewolfState(object):
#   def __init__(self, config: Type[Config]) -> None:
#   def _InvokeModulesInThreads(self, callback: Callable[[Any], Any]) -> None:
#   def ImportRecipeModules(self, module_locations: Dict[str, str]) -> None:
#   def LoadRecipe(self,
#                  recipe: Dict[str, Any],
#                  module_locations: Dict[str, str]) -> None:
#   def FormatExecutionPlan(self) -> str:
#   def LogExecutionPlan(self) -> None:
#   def AddToCache(self, name: str, value: Any) -> None:
#   def GetFromCache(self, name: str, default_value: Any=None) -> Any:
#   def StoreContainer(self, container: "interface.AttributeContainer") -> None:
#   def GetContainers(self,
#                     container_class: Type[T],
#                     pop: bool=False) -> Sequence[T]:
#   def DedupeContainers(self, container_class: Type[T]) -> None:
#   def _SetupModuleThread(self, module_definition: Dict[str, str]) -> None:
#   def SetupModules(self) -> None:
#   def _RunModuleThread(self, module_definition: Dict[str, str]) -> None:
#   def RunPreflights(self) -> None:
#   def CleanUpPreflights(self) -> None:
#   def InstantiateModule(self, module_name: str) -> "dftw_module.BaseModule":
#   def RunModules(self) -> None:
#   def RegisterStreamingCallback(
#       self,
#       target: Callable[["interface.AttributeContainer"], Any],
#       container_type: Type["interface.AttributeContainer"]) -> None:
#   def StreamContainer(self, container: "interface.AttributeContainer") -> None:
#   def AddError(self, error: DFTimewolfError) -> None:
#   def CleanUp(self) -> None:
#   def CheckErrors(self, is_global: bool=False) -> None:
# 
# Path: dftimewolf/config.py
# class Config(object):
#   def GetExtra(cls, name: str='') -> Dict[str, Any]:
#   def LoadExtra(cls, filename: str) -> bool:
#   def LoadExtraData(cls, json_string: bytes) -> None:
#   def ClearExtra(cls) -> None:
# 
# Path: dftimewolf/lib/collectors/azure_logging.py
# class AzureLogsCollector(module.BaseModule):
#   def __init__(self,
#                state: DFTimewolfState,
#                name: Optional[str]=None,
#                critical: bool=False) -> None:
#   def SetUp(self,
#             subscription_id: str,
#             filter_expression: str,
#             profile_name: Optional[str]=None) -> None:
#   def Process(self) -> None:
# 
# Path: dftimewolf/lib/containers/containers.py
# class AzureLogs(interface.AttributeContainer):
#   """Azure logs container.
# 
#   Attributes:
#       path (str): path to an Azure log file.
#       filter_expression (str): the filter_expression used in the log query.
#       subscription_id (str): the subscription_id of the queried subscription.
#   """
#   CONTAINER_TYPE = 'azure_logs'
# 
#   def __init__(
#       self, path: str, filter_expression: Optional[str],
#       subscription_id: Optional[str]) -> None:
#     """Initializes the Azure logs container.
# 
#     Args:
#       path (str): path to a Azure log file.
#       filter_expression (str): the filter used in the log query.
#       subscription_id (str): the subscription_id of the queried subscription.
#     """
#     super(AzureLogs, self).__init__()
#     self.path = path
#     self.filter_expression = filter_expression
#     self.subscription_id = subscription_id
# 
# Path: dftimewolf/lib/errors.py
# class DFTimewolfError(Exception):
# class BadConfigurationError(DFTimewolfError):
# class RecipeParseError(DFTimewolfError):
# class CommandLineParseError(DFTimewolfError):
# class CriticalError(DFTimewolfError):
#   def __init__(self,
#                message: Optional[str]=None,
#                name: Optional[str]=None,
#                stacktrace: Optional[str]=None,
#                critical: bool=False,
#                unexpected: bool=False) -> None:


import unittest
import unittest.mock as mock
from azure.core import exceptions as az_exceptions
from dftimewolf.lib import state
from dftimewolf import config
from dftimewolf.lib.collectors import azure_logging
from dftimewolf.lib.containers.containers import AzureLogs
from dftimewolf.lib import errors
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests the Azure logging collector."""





class AzureLogging(unittest.TestCase):
  """Tests for the Azure logging collector."""

  def testInitialization(self):
    """Tests that the collector can be initialized."""
    test_state = state.DFTimewolfState(config.Config)
    azure_logging_collector = azure_logging.AzureLogsCollector(test_state)
    self.assertIsNotNone(azure_logging_collector)

  # pylint: disable=protected-access
  def testSetup(self):
    """Tests that attributes are properly set during setup."""

# Path: dftimewolf/lib/state.py
# T = TypeVar("T", bound="interface.AttributeContainer")  # pylint: disable=invalid-name,line-too-long
# NEW_ISSUE_URL = 'https://github.com/log2timeline/dftimewolf/issues/new'
# class DFTimewolfState(object):
#   def __init__(self, config: Type[Config]) -> None:
#   def _InvokeModulesInThreads(self, callback: Callable[[Any], Any]) -> None:
#   def ImportRecipeModules(self, module_locations: Dict[str, str]) -> None:
#   def LoadRecipe(self,
#                  recipe: Dict[str, Any],
#                  module_locations: Dict[str, str]) -> None:
#   def FormatExecutionPlan(self) -> str:
#   def LogExecutionPlan(self) -> None:
#   def AddToCache(self, name: str, value: Any) -> None:
#   def GetFromCache(self, name: str, default_value: Any=None) -> Any:
#   def StoreContainer(self, container: "interface.AttributeContainer") -> None:
#   def GetContainers(self,
#                     container_class: Type[T],
#                     pop: bool=False) -> Sequence[T]:
#   def DedupeContainers(self, container_class: Type[T]) -> None:
#   def _SetupModuleThread(self, module_definition: Dict[str, str]) -> None:
#   def SetupModules(self) -> None:
#   def _RunModuleThread(self, module_definition: Dict[str, str]) -> None:
#   def RunPreflights(self) -> None:
#   def CleanUpPreflights(self) -> None:
#   def InstantiateModule(self, module_name: str) -> "dftw_module.BaseModule":
#   def RunModules(self) -> None:
#   def RegisterStreamingCallback(
#       self,
#       target: Callable[["interface.AttributeContainer"], Any],
#       container_type: Type["interface.AttributeContainer"]) -> None:
#   def StreamContainer(self, container: "interface.AttributeContainer") -> None:
#   def AddError(self, error: DFTimewolfError) -> None:
#   def CleanUp(self) -> None:
#   def CheckErrors(self, is_global: bool=False) -> None:
# 
# Path: dftimewolf/config.py
# class Config(object):
#   def GetExtra(cls, name: str='') -> Dict[str, Any]:
#   def LoadExtra(cls, filename: str) -> bool:
#   def LoadExtraData(cls, json_string: bytes) -> None:
#   def ClearExtra(cls) -> None:
# 
# Path: dftimewolf/lib/collectors/azure_logging.py
# class AzureLogsCollector(module.BaseModule):
#   def __init__(self,
#                state: DFTimewolfState,
#                name: Optional[str]=None,
#                critical: bool=False) -> None:
#   def SetUp(self,
#             subscription_id: str,
#             filter_expression: str,
#             profile_name: Optional[str]=None) -> None:
#   def Process(self) -> None:
# 
# Path: dftimewolf/lib/containers/containers.py
# class AzureLogs(interface.AttributeContainer):
#   """Azure logs container.
# 
#   Attributes:
#       path (str): path to an Azure log file.
#       filter_expression (str): the filter_expression used in the log query.
#       subscription_id (str): the subscription_id of the queried subscription.
#   """
#   CONTAINER_TYPE = 'azure_logs'
# 
#   def __init__(
#       self, path: str, filter_expression: Optional[str],
#       subscription_id: Optional[str]) -> None:
#     """Initializes the Azure logs container.
# 
#     Args:
#       path (str): path to a Azure log file.
#       filter_expression (str): the filter used in the log query.
#       subscription_id (str): the subscription_id of the queried subscription.
#     """
#     super(AzureLogs, self).__init__()
#     self.path = path
#     self.filter_expression = filter_expression
#     self.subscription_id = subscription_id
# 
# Path: dftimewolf/lib/errors.py
# class DFTimewolfError(Exception):
# class BadConfigurationError(DFTimewolfError):
# class RecipeParseError(DFTimewolfError):
# class CommandLineParseError(DFTimewolfError):
# class CriticalError(DFTimewolfError):
#   def __init__(self,
#                message: Optional[str]=None,
#                name: Optional[str]=None,
#                stacktrace: Optional[str]=None,
#                critical: bool=False,
#                unexpected: bool=False) -> None:


# Path: tests/lib/collectors/azure_logging.py
import unittest
import unittest.mock as mock
from azure.core import exceptions as az_exceptions
from dftimewolf.lib import state
from dftimewolf import config
from dftimewolf.lib.collectors import azure_logging
from dftimewolf.lib.containers.containers import AzureLogs
from dftimewolf.lib import errors

#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests the Azure logging collector."""





class AzureLogging(unittest.TestCase):
  """Tests for the Azure logging collector."""

  def testInitialization(self):
    """Tests that the collector can be initialized."""
    test_state = state.DFTimewolfState(config.Config)
    azure_logging_collector = azure_logging.AzureLogsCollector(test_state)
    self.assertIsNotNone(azure_logging_collector)

  # pylint: disable=protected-access
  def testSetup(self):
    """Tests that attributes are properly set during setup."""

    test_state = state.DFTimewolfState(config.Config)