# Path: auto_forensicate/errors.py
# class BadConfigOption(Exception):
# class ForensicateError(Exception):
# class RecipeException(Exception):
# class RetryableError(ForensicateError):
# 
# Path: auto_forensicate/uploader.py
# class BaseUploader(object):
# class LocalCopier(BaseUploader):
# class GCSUploader(BaseUploader):
#   def __init__(self, stamp_manager, stamp=None):
#   def _UploadStamp(self):
#   def _MakeRemotePath(self, destination):
#   def _UploadStream(self, stream, remote_path, update_callback=None):
#   def UploadArtifact(self, artifact, update_callback=None):
#   def __init__(self, destination_dir, stamp_manager, stamp=None):
#   def _UploadStream(self, stream, remote_path, update_callback=None):
#   def _MakeRemotePath(self, destination):
#   def __init__(self, gs_url, gs_keyfile, client_id, stamp_manager, stamp=None):
#   def _InitBoto(self):
#   def _SplitGCSUrl(self):
#   def _MakeRemotePath(self, destination):
#   def _UploadStream(self, stream, remote_path, update_callback=None):
# 
# 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/stamp/manager.py
# class BaseStampManager(object):
#   def BasePathElements(self, stamp):
#   def GetStamp(self):


import argparse
import json
import tempfile
import unittest
import boto
import mock
import shutil
from collections import namedtuple
  from BytesIO import BytesIO
  from io import BytesIO
from auto_forensicate import errors
from auto_forensicate import uploader
from auto_forensicate.recipes import base
from auto_forensicate.stamp import manager

try:
except ImportError:




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

class FakeStamp(
    namedtuple('Stamp', [
        'asset_tag',
        'identifier',
        'start_time'
    ])):
  pass

FAKE_STAMP = FakeStamp(
    asset_tag='fake_asset_tag',
    identifier='fake_uuid',
    start_time='20171012-135619'
)

FAKE_STAMP_NO_ASSET = FakeStamp(
    asset_tag=None,
    identifier='fake_uuid',
    start_time='20171012-135619'
)


# Path: auto_forensicate/errors.py
# class BadConfigOption(Exception):
# class ForensicateError(Exception):
# class RecipeException(Exception):
# class RetryableError(ForensicateError):
# 
# Path: auto_forensicate/uploader.py
# class BaseUploader(object):
# class LocalCopier(BaseUploader):
# class GCSUploader(BaseUploader):
#   def __init__(self, stamp_manager, stamp=None):
#   def _UploadStamp(self):
#   def _MakeRemotePath(self, destination):
#   def _UploadStream(self, stream, remote_path, update_callback=None):
#   def UploadArtifact(self, artifact, update_callback=None):
#   def __init__(self, destination_dir, stamp_manager, stamp=None):
#   def _UploadStream(self, stream, remote_path, update_callback=None):
#   def _MakeRemotePath(self, destination):
#   def __init__(self, gs_url, gs_keyfile, client_id, stamp_manager, stamp=None):
#   def _InitBoto(self):
#   def _SplitGCSUrl(self):
#   def _MakeRemotePath(self, destination):
#   def _UploadStream(self, stream, remote_path, update_callback=None):
# 
# 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/stamp/manager.py
# class BaseStampManager(object):
#   def BasePathElements(self, stamp):
#   def GetStamp(self):


# Path: tests/uploader_tests.py
import argparse
import json
import tempfile
import unittest
import boto
import mock
import shutil
from collections import namedtuple
  from BytesIO import BytesIO
  from io import BytesIO
from auto_forensicate import errors
from auto_forensicate import uploader
from auto_forensicate.recipes import base
from auto_forensicate.stamp import manager


try:
except ImportError:




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

class FakeStamp(
    namedtuple('Stamp', [
        'asset_tag',
        'identifier',
        'start_time'
    ])):
  pass

FAKE_STAMP = FakeStamp(
    asset_tag='fake_asset_tag',
    identifier='fake_uuid',
    start_time='20171012-135619'
)

FAKE_STAMP_NO_ASSET = FakeStamp(
    asset_tag=None,
    identifier='fake_uuid',
    start_time='20171012-135619'
)


class FakeGCSUploader(uploader.GCSUploader):