Exemplo n.º 1
0
	def testAll(self):
		q = """
not plateform:winxp
or (
	code:200 
	and  browser:firefox
)"""
		query = Query(q)
		#print query.asXML()
		#print value(query, self.library)
		self.assertEquals(set([0]), value(query, self.library).results())
Exemplo n.º 2
0
	def testOr(self):
		query = Query(' plateform:winxp or plateform:linux')
		self.assertEquals(set([0, 1]), value(query, self.library).results())
Exemplo n.º 3
0
	def testDummy(self):
		query = Query('not (plateform:winxp)')
		self.assertEquals(set([0]), value(query, self.library).results())
Exemplo n.º 4
0
	def testSimple(self):
		query = Query('plateform:winxp')
		self.assertEquals(set([1]), value(query, self.library).results())