# Path: staticassets/utils.py
# def read_file(path):
#     with codecs.open(path, 'r', encoding='utf-8') as f:
#         return f.read()
# 
# def get_digest(source):
#     return hashlib.md5(source.encode('utf-8')).hexdigest()
# 
# Path: staticassets/finder.py
# class BaseAssetFinder(object):
# class AssetFinder(BaseAssetFinder):
#     def find(self, path, bundle=False, **options):
#     def __init__(self):
#     def find(self, path, **options):
#     def resolve(self, path, **options):
#     def list(self):
#     def get_search_regex(self, path, content_type=None):
#     def get_cache_key(self, path, options):
# def find(*args, **kwargs):
# def resolve(*args, **kwargs):


import os
from unittest2 import TestCase as BaseTestCase
from staticassets.utils import read_file, get_digest
from staticassets.finder import cache
from . import settings





FIXTURES_ROOT = os.path.join(settings.BASE_DIR, 'fixtures')


class TestCase(BaseTestCase):
    fixtures_dir = 'default'

    def fixture_path(self, path):
        return os.path.join(FIXTURES_ROOT, self.fixtures_dir, path)

    def fixture(self, path):
        return read_file(self.fixture_path(path))

    def file_digest(self, path):

# Path: staticassets/utils.py
# def read_file(path):
#     with codecs.open(path, 'r', encoding='utf-8') as f:
#         return f.read()
# 
# def get_digest(source):
#     return hashlib.md5(source.encode('utf-8')).hexdigest()
# 
# Path: staticassets/finder.py
# class BaseAssetFinder(object):
# class AssetFinder(BaseAssetFinder):
#     def find(self, path, bundle=False, **options):
#     def __init__(self):
#     def find(self, path, **options):
#     def resolve(self, path, **options):
#     def list(self):
#     def get_search_regex(self, path, content_type=None):
#     def get_cache_key(self, path, options):
# def find(*args, **kwargs):
# def resolve(*args, **kwargs):


# Path: tests/test.py
import os
from unittest2 import TestCase as BaseTestCase
from staticassets.utils import read_file, get_digest
from staticassets.finder import cache
from . import settings






FIXTURES_ROOT = os.path.join(settings.BASE_DIR, 'fixtures')


class TestCase(BaseTestCase):
    fixtures_dir = 'default'

    def fixture_path(self, path):
        return os.path.join(FIXTURES_ROOT, self.fixtures_dir, path)

    def fixture(self, path):
        return read_file(self.fixture_path(path))

    def file_digest(self, path):

        return get_digest(read_file(path))