Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)

src/p/r/Products.BooleanIndex-1.0.2/Products/BooleanIndex/tests.py   Products.BooleanIndex(Download)
    def test_index_true(self):
        index = BooleanIndex.BooleanIndex('truth')
        obj = Dummy(1, True)
        index._index_object(obj.id, obj, attr='truth')
        self.failUnless(index._unindex.has_key(1))
        self.failUnless(index._index.has_key(1))
 
    def test_index_false(self):
        index = BooleanIndex.BooleanIndex('truth')
    def test_index_missing_attribute(self):
        index = BooleanIndex.BooleanIndex('truth')
        obj = Dummy(1, True)
        index._index_object(obj.id, obj, attr='missing')
        self.assertFalse(1 in index._unindex)
        self.assertFalse(1 in index._index)
 
    def test_search_true(self):
        index = BooleanIndex.BooleanIndex('truth')
    def test_search_false(self):
        index = BooleanIndex.BooleanIndex('truth')
        obj = Dummy(1, True)
        index._index_object(obj.id, obj, attr='truth')
        obj = Dummy(2, False)