# Path: auto_forensicate/errors.py
# class BadConfigOption(Exception):
# class ForensicateError(Exception):
# class RecipeException(Exception):
# class RetryableError(ForensicateError):
# 
# Path: auto_forensicate/hostinfo.py
# def ReadDMI(name):
# def GetChassisSerial():
# def GetMachineUUID():
# def GetRandomUUID():
# def GetIdentifier():
# def GetUdevadmInfo(device_name):
# def GetTime():
# def Which(cmd):
# 
# Path: auto_forensicate/macdisk.py
# class MacDiskError(Exception):
# class Disk(object):
# def _DictFromSubprocess(command):
# def _DictFromDiskutilInfo(deviceid):
# def _DictFromDiskutilList():
# def WholeDisks():
#   def __init__(self, deviceid):
#   def Refresh(self):
# 
# Path: auto_forensicate/recipes/base.py
# class BaseArtifact(object):
# class StringArtifact(BaseArtifact):
# class FileArtifact(BaseArtifact):
# class ProcessOutputArtifact(BaseArtifact):
# class BaseRecipe(object):
#   def __init__(self, name):
#   def _GetStream(self):
#   def CloseStream(self):
#   def OpenStream(self):
#   def size(self):
#   def readable_size(self):
#   def __init__(self, path, string_content):
#   def _GetStream(self):
#   def CloseStream(self):
#   def __init__(self, path):
#   def _GetStream(self):
#   def __init__(self, command, path, ignore_failure=False):
#   def _RunCommand(self):
#   def _GetStream(self):
#   def __init__(self, name, options=None):
#   def __enter__(self):
#   def __exit__(self, exc_type, exc_value, traceback):
#   def GetArtifacts(self):
# 
# Path: auto_forensicate/recipes/disk.py
# class DiskArtifact(base.BaseArtifact):
# class MacDiskArtifact(DiskArtifact):
# class LinuxDiskArtifact(DiskArtifact):
# class DiskRecipe(base.BaseRecipe):
#   _DD_BINARY = 'dcfldd'
#   _DD_OPTIONS = ['hash=md5,sha1', 'bs=2M', 'conv=noerror', 'hashwindow=128M']
#   def __init__(self, path, size, use_dcfldd=True):
#   def _GenerateDDCommand(self):
#   def _GetStream(self):
#   def CloseStream(self):
#   def GetDescription(self):
#   def ProbablyADisk(self):
#   def __init__(self, path, size, use_dcfldd=True):
#   def _IsUsb(self):
#   def ProbablyADisk(self):
#   def __init__(self, path, size, use_dcfldd=True):
#   def GetDescription(self):
#   def _GetUdevadmProperty(self, prop):
#   def ProbablyADisk(self):
#   def _IsFloppy(self):
#   def _IsUsb(self):
#   def __init__(self, name, options=None):
#   def _GetLsblkDict(self):
#   def _ListAllDisksMac(self):
#   def _ListAllDisksLinux(self):
#   def _ListDisks(self, all_devices=False, names=None):
#   def _GetListDisksArtifact(self):
#   def _GetDiskInfoArtifact(self, disk):
#   def GetArtifacts(self):


import json
import unittest
import mock
from auto_forensicate import errors
from auto_forensicate import hostinfo
from auto_forensicate import macdisk
from auto_forensicate.recipes import base
from auto_forensicate.recipes import disk
# -*- coding: utf-8 -*-
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for the disk.py module."""

from __future__ import unicode_literals

#pylint: disable=unused-import


# pylint: disable=missing-docstring
# pylint: disable=protected-access

class DiskArtifactTests(unittest.TestCase):
  """Tests for the DiskArtifact class."""

  def testInstantiate(self):
    name = 'sdx'
    path = '/dev/{0:s}'.format(name)

# Path: auto_forensicate/errors.py
# class BadConfigOption(Exception):
# class ForensicateError(Exception):
# class RecipeException(Exception):
# class RetryableError(ForensicateError):
# 
# Path: auto_forensicate/hostinfo.py
# def ReadDMI(name):
# def GetChassisSerial():
# def GetMachineUUID():
# def GetRandomUUID():
# def GetIdentifier():
# def GetUdevadmInfo(device_name):
# def GetTime():
# def Which(cmd):
# 
# Path: auto_forensicate/macdisk.py
# class MacDiskError(Exception):
# class Disk(object):
# def _DictFromSubprocess(command):
# def _DictFromDiskutilInfo(deviceid):
# def _DictFromDiskutilList():
# def WholeDisks():
#   def __init__(self, deviceid):
#   def Refresh(self):
# 
# Path: auto_forensicate/recipes/base.py
# class BaseArtifact(object):
# class StringArtifact(BaseArtifact):
# class FileArtifact(BaseArtifact):
# class ProcessOutputArtifact(BaseArtifact):
# class BaseRecipe(object):
#   def __init__(self, name):
#   def _GetStream(self):
#   def CloseStream(self):
#   def OpenStream(self):
#   def size(self):
#   def readable_size(self):
#   def __init__(self, path, string_content):
#   def _GetStream(self):
#   def CloseStream(self):
#   def __init__(self, path):
#   def _GetStream(self):
#   def __init__(self, command, path, ignore_failure=False):
#   def _RunCommand(self):
#   def _GetStream(self):
#   def __init__(self, name, options=None):
#   def __enter__(self):
#   def __exit__(self, exc_type, exc_value, traceback):
#   def GetArtifacts(self):
# 
# Path: auto_forensicate/recipes/disk.py
# class DiskArtifact(base.BaseArtifact):
# class MacDiskArtifact(DiskArtifact):
# class LinuxDiskArtifact(DiskArtifact):
# class DiskRecipe(base.BaseRecipe):
#   _DD_BINARY = 'dcfldd'
#   _DD_OPTIONS = ['hash=md5,sha1', 'bs=2M', 'conv=noerror', 'hashwindow=128M']
#   def __init__(self, path, size, use_dcfldd=True):
#   def _GenerateDDCommand(self):
#   def _GetStream(self):
#   def CloseStream(self):
#   def GetDescription(self):
#   def ProbablyADisk(self):
#   def __init__(self, path, size, use_dcfldd=True):
#   def _IsUsb(self):
#   def ProbablyADisk(self):
#   def __init__(self, path, size, use_dcfldd=True):
#   def GetDescription(self):
#   def _GetUdevadmProperty(self, prop):
#   def ProbablyADisk(self):
#   def _IsFloppy(self):
#   def _IsUsb(self):
#   def __init__(self, name, options=None):
#   def _GetLsblkDict(self):
#   def _ListAllDisksMac(self):
#   def _ListAllDisksLinux(self):
#   def _ListDisks(self, all_devices=False, names=None):
#   def _GetListDisksArtifact(self):
#   def _GetDiskInfoArtifact(self, disk):
#   def GetArtifacts(self):


# Path: tests/disk_tests.py
import json
import unittest
import mock
from auto_forensicate import errors
from auto_forensicate import hostinfo
from auto_forensicate import macdisk
from auto_forensicate.recipes import base
from auto_forensicate.recipes import disk

# -*- coding: utf-8 -*-
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for the disk.py module."""

from __future__ import unicode_literals

#pylint: disable=unused-import


# pylint: disable=missing-docstring
# pylint: disable=protected-access

class DiskArtifactTests(unittest.TestCase):
  """Tests for the DiskArtifact class."""

  def testInstantiate(self):
    name = 'sdx'
    path = '/dev/{0:s}'.format(name)

    d = disk.DiskArtifact(path, 100)