Beispiel #1
0
class LocalTest(unittest.TestCase):
    def setUp(self):
        self.engine = Local("/tmp")

    def test_init(self):
        assert self.engine.NAME == "LOCAL"
        assert self.engine.directory == "/tmp"

    @mock.patch("flumine.storage.storageengine.shutil")
    def test_load(self, mock_shutil):
        self.engine.load("zip", None)

        mock_shutil.copy.assert_called_with("zip", "/tmp")

    def test_validate_settings(self):
        self.engine.directory = "/sefiodeg"
        with self.assertRaises(OSError):
            self.engine.validate_settings()
Beispiel #2
0
class LocalTest(unittest.TestCase):
    def setUp(self):
        self.engine = Local('/tmp')

    def test_init(self):
        assert self.engine.NAME == 'LOCAL'
        assert self.engine.directory == '/tmp'

    @mock.patch('flumine.storage.storageengine.shutil')
    def test_load(self, mock_shutil):
        self.engine.load('zip', None)

        mock_shutil.copy.assert_called_with('zip', '/tmp')

    def test_validate_settings(self):
        self.engine.directory = '/sefiodeg'
        with self.assertRaises(OSError):
            self.engine.validate_settings()
Beispiel #3
0
 def setUp(self):
     self.engine = Local("/tmp")
Beispiel #4
0
 def setUp(self):
     self.engine = Local('/tmp')