Beispiel #1
0
class TestDummyTempStore(TestCase):

    def setUp(self):
        self.store = DummyTempStore()
        
    def test_get(self):
        compare(
            self.store.get('x'),
            None
            )

    def test_get_default(self):
        compare(
            self.store.get('x',1),
            1
            )

    def test_getitem(self):
        with ShouldRaise(KeyError('x')):
            self.store['x']

    def test_setitem(self):
        self.store['x']=1

    def test_preview_url(self):
        compare(
            self.store.preview_url('x'),
            None
            )

    def test_in(self):
        compare(
            0 in self.store,
            False
            )
Beispiel #2
0
 def setUp(self):
     self.store = DummyTempStore()