Source

doqu / tests / test_ext_shelve.py

Full commit
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"Shelve (BDB) backend tests."
import unittest2 as unittest

from doqu.ext.shelve_db import StorageAdapter
import base_query
import base_storage


class _ShelveMixin(object):
    def get_connection(self):
        return StorageAdapter(path=self._tmp_filename)


class ShelveStorageTestCase(_ShelveMixin, base_storage.BaseStorageTestCase):
    pass


class ShelveQueryTestCase(_ShelveMixin, base_query.BaseQueryTestCase):
    @unittest.expectedFailure
    def test_op_exists(self):
        super(ShelveQueryTestCase, self).test_op_exists()