# Path: seedbox/db/models.py
# class Model(object):
# class Torrent(Model):
# class MediaFile(Model):
# class AppState(Model):
#     PK_NAME = 'id'
#     PK_NAME = 'torrent_id'
#     PK_NAME = 'media_id'
#     PK_NAME = 'name'
#     def __init__(self, **kwds):
#     def as_dict(self):
#     def items(self):
#     def __eq__(self, other):
#     def __iter__(self):
#     def __getitem__(self, name):
#     def __setitem__(self, name, value):
#     def __contains__(self, name):
#     def __str__(self):
#     def pk_filter(cls, value=None):
#     def make_empty(cls):
#     def __init__(self, torrent_id, name, created_at=None, updated_at=None,
#                  state=None, retry_count=None, failed=None, error_msg=None,
#                  invalid=None, purged=None, media_files=None):
#     def __init__(self, media_id, torrent_id, filename, file_ext,
#                  file_path=None, size=None, compressed=None, synced=None,
#                  missing=None, skipped=None, error_msg=None, total_time=None):
#     def __init__(self, name, value):
# 
# Path: seedbox/tasks/fileunrar.py
# LOG = logging.getLogger(__name__)
# class UnrarFile(base.BaseTask):
#     def is_actionable(media_file):
#     def execute(self):
# 
# Path: seedbox/tests/test.py
# class ConfiguredBaseTestCase(BaseTestCase):
#     def setUp(self):
#     def tearDown(self):
#     def _make_dir(self, dirname):
#     def set_required_options(self):


import os
from seedbox.db import models
from seedbox.tasks import fileunrar
from seedbox.tests import test
from __future__ import print_function



class FakeRarfile(object):

    class RarFile(object):

        def __init__(self, rarfile):
            print('RarFile', rarfile)
            self.rarfile = rarfile

        def namelist(self):
            return ['fake1.mp4']

        def extractall(self, path):
            open(os.path.join(path, 'fake1.mp4'), 'w').close()

        def __enter__(self):
            return self

        def __exit__(self, type, value, traceback):
            self.close()

        def close(self):

# Path: seedbox/db/models.py
# class Model(object):
# class Torrent(Model):
# class MediaFile(Model):
# class AppState(Model):
#     PK_NAME = 'id'
#     PK_NAME = 'torrent_id'
#     PK_NAME = 'media_id'
#     PK_NAME = 'name'
#     def __init__(self, **kwds):
#     def as_dict(self):
#     def items(self):
#     def __eq__(self, other):
#     def __iter__(self):
#     def __getitem__(self, name):
#     def __setitem__(self, name, value):
#     def __contains__(self, name):
#     def __str__(self):
#     def pk_filter(cls, value=None):
#     def make_empty(cls):
#     def __init__(self, torrent_id, name, created_at=None, updated_at=None,
#                  state=None, retry_count=None, failed=None, error_msg=None,
#                  invalid=None, purged=None, media_files=None):
#     def __init__(self, media_id, torrent_id, filename, file_ext,
#                  file_path=None, size=None, compressed=None, synced=None,
#                  missing=None, skipped=None, error_msg=None, total_time=None):
#     def __init__(self, name, value):
# 
# Path: seedbox/tasks/fileunrar.py
# LOG = logging.getLogger(__name__)
# class UnrarFile(base.BaseTask):
#     def is_actionable(media_file):
#     def execute(self):
# 
# Path: seedbox/tests/test.py
# class ConfiguredBaseTestCase(BaseTestCase):
#     def setUp(self):
#     def tearDown(self):
#     def _make_dir(self, dirname):
#     def set_required_options(self):


# Path: seedbox/tests/tasks/test_fileunrar.py
import os
from seedbox.db import models
from seedbox.tasks import fileunrar
from seedbox.tests import test

from __future__ import print_function



class FakeRarfile(object):

    class RarFile(object):

        def __init__(self, rarfile):
            print('RarFile', rarfile)
            self.rarfile = rarfile

        def namelist(self):
            return ['fake1.mp4']

        def extractall(self, path):
            open(os.path.join(path, 'fake1.mp4'), 'w').close()

        def __enter__(self):
            return self

        def __exit__(self, type, value, traceback):
            self.close()

        def close(self):

            pass