Beispiel #1
0
class MixedStorageFromConfTestCase(BaseMidexStorageTestCase):
    def get_context(self, *args, **kwargs):
        context = super(MixedStorageFromConfTestCase,
                        self).get_context(*args, **kwargs)
        self.storage = MixedStorage(context)
        return context

    @tornado.testing.gen_test
    def test_get_data(self):
        path = yield self.storage.get('path')
        file_storage, crypto_storage, detector_storage = self.get_storages()
        expect(self.storage.file_storage).to_be_instance_of(NoStorage)
        expect(path).to_be_null()

    @tornado.testing.gen_test
    def test_get_detector_data(self):
        path = yield self.storage.get_detector_data('path')
        expect(self.storage.detector_storage).to_be_instance_of(NoStorage)
        expect(path).to_be_null()

    @tornado.testing.gen_test
    def test_get_crypto(self):
        path = yield self.storage.get_crypto('path')
        expect(self.storage.crypto_storage).to_be_instance_of(NoStorage)
        expect(path).to_be_null()
Beispiel #2
0
class MixedStorageFromConfTestCase(BaseMidexStorageTestCase):
    def get_context(self, *args, **kwargs):
        context = super(MixedStorageFromConfTestCase, self).get_context(*args, **kwargs)
        self.storage = MixedStorage(context)
        return context

    @tornado.testing.gen_test
    def test_get_data(self):
        path = yield self.storage.get('path')
        file_storage, crypto_storage, detector_storage = self.get_storages()
        expect(self.storage.file_storage).to_be_instance_of(NoStorage)
        expect(path).to_be_null()

    @tornado.testing.gen_test
    def test_get_detector_data(self):
        path = yield self.storage.get_detector_data('path')
        expect(self.storage.detector_storage).to_be_instance_of(NoStorage)
        expect(path).to_be_null()

    @tornado.testing.gen_test
    def test_get_crypto(self):
        path = yield self.storage.get_crypto('path')
        expect(self.storage.crypto_storage).to_be_instance_of(NoStorage)
        expect(path).to_be_null()