def testTriples(self): st = NDBStore(identifier = 'banana') st.addN([(s, p, o, None) for (s, p, o) in _TRIPLES]) patterns = itertools.product(*zip(_TRIPLES[0], _TRIPLES[-1], [None, None, None])) for pattern in patterns: self._assertSameMatches(st, pattern)
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))