Ejemplo n.º 1
0
    def setUp(self):
        super(FileSystemTestCase, self).setUp()

        self._storage = FileSystem(MockConfig())
        with open(
                join(dirname(__file__), '..', '..', '..',
                     'fixtures/image.jpeg'), 'r') as image_file:
            self._image_body = image_file.read()
        self._image_id = 'id'
        self._request = MagicMock()
        self._request.protocol = 'http'
        self._request.host = 'localhost:8080'

        file_system_for_test.cleanup()
Ejemplo n.º 2
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import shutil

from impim_api.domain.storage import FileSystem

from tests.support.mock_config import MockConfig

_file_system = FileSystem(config=MockConfig())


def cleanup():
    shutil.rmtree(_file_system._root_path, ignore_errors=True)