<commit_before>from unittest import mock, TestCase
from nose.plugins.attrib import attr
from nose.tools import assert_raises

import os
import shutil
from PIL import Image
from shiftmedia import Storage, BackendLocal, utils
from shiftmedia import exceptions as x
from shiftmedia.testing.localstorage_testhelpers import LocalStorageTestHelpers
from pprint import pprint as pp

@attr('storage')
class StorageTests(TestCase, LocalStorageTestHelpers):
    """ Storage service tests """

    def setUp(self):
        super().setUp()

    def tearDown(self):
        """ Clean up after yourself """
        # self.clean()
        super().tearDown()

    # ------------------------------------------------------------------------
    # Tests
    # ------------------------------------------------------------------------

    def test_instantiate_storage(self):
        """ Instantiating storage """
        backend = mock.MagicMock()
        storage = Storage(
            backend=backend,<commit_msg>Clean after yourself<commit_after>from unittest import mock, TestCase
from nose.plugins.attrib import attr
from nose.tools import assert_raises

import os
import shutil
from PIL import Image
from shiftmedia import Storage, BackendLocal, utils
from shiftmedia import exceptions as x
from shiftmedia.testing.localstorage_testhelpers import LocalStorageTestHelpers
from pprint import pprint as pp

@attr('storage')
class StorageTests(TestCase, LocalStorageTestHelpers):
    """ Storage service tests """

    def setUp(self):
        super().setUp()

    def tearDown(self):
        """ Clean up after yourself """
        self.clean()
        super().tearDown()

    # ------------------------------------------------------------------------
    # Tests
    # ------------------------------------------------------------------------

    def test_instantiate_storage(self):
        """ Instantiating storage """
        backend = mock.MagicMock()
        storage = Storage(
            backend=backend,
{'fraction_non_alphanumeric': 0.21604010025062656, 'fraction_numerical': 0.0, 'mean_word_length': 1.9352941176470588, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2209380', 'n_tokens_mistral': 456, 'n_tokens_neox': 449, 'n_words': 143}