Example #1
0
 def test_args(self):
     self.assertEqual(str(F(apple="fruit")), str(filterbuilder(F(apple="fruit"))))
Example #2
0
 def test_or(self):
     self.assertEqual("|(orange=color)(orange=fruit)", str(F(orange="color") | F(orange="fruit")))
Example #3
0
 def test_from_string(self):
     self.assertEqual("|(orange=color)(orange=fruit)", str(F.from_string("|(orange=color)(orange=fruit)")))
Example #4
0
 def test_and(self):
     self.assertEqual("&(orange=color)(orange=fruit)", str(F(orange="color") & F(orange="fruit")))
Example #5
0
 def test_not_equal(self):
     self.assertEqual("!(orange=color)", str(~F(orange="color")))
Example #6
0
 def test_equal(self):
     self.assertEqual("orange=color", str(F(orange="color")))
Example #7
0
 def test_args_and_kwargs(self):
     self.assertEqual(str(F(apple="fruit") & F(earth="round")), str(filterbuilder(F(apple="fruit"), earth="round")))
Example #8
0
 def test_multiple_args(self):
     self.assertEqual(str(F(apple="fruit") & F(apple="round")), str(filterbuilder(F(apple="fruit"), F(apple="round"))))