def testSequenceAddAndRetrieveAndRemove(self):
     st = NDBStore(identifier = 'banana')
     for index in range(len(_TRIPLES)):
         st.add(_TRIPLES[index], None)
         self.assertEquals(1, len(st))
         self._assertSameSet(_TRIPLES[index:index+1], st.triples((None, None, None), None))
         st.remove(_TRIPLES[index], None)
         self.assertEquals(0, len(st))
         self._assertSameSet([], st.triples((None, None, None), None))
 def testDestroy(self):
     st = NDBStore(identifier = 'banana')
     st.addN([(s, p, o, None) for (s, p, o) in _TRIPLES])
     st.destroy(None)
     self._assertSameSet(set(), st.triples((None, None, None), None))
 def testAddN(self):
     st = NDBStore(identifier = 'banana')
     st.addN([(s, p, o, None) for (s, p, o) in _TRIPLES])
     self.assertEquals(len(_TRIPLES), len(st))
     self._assertSameSet(_TRIPLES, st.triples((None, None, None), None))
 def testSingleAddAndRetrieve(self):
     st = NDBStore(identifier = 'banana')
     st.add(_TRIPLES[0], None)
     self.assertEquals(1, len(st))
     self._assertSameSet(_TRIPLES[0:1], st.triples((None, None, None), None))