예제 #1
0
    def test_RawFilter_search(self):
        filter_ = dict(ids=dict(type="my_type", values=["1", "4", "100"]))
        filter_string = json.dumps(filter_)

        self.assertEqual(Search(filter=RawFilter(filter_)).serialize(),
            dict(filter=filter_))
        self.assertEqual(Search(filter=RawFilter(filter_string)).serialize(),
            dict(filter=filter_))
예제 #2
0
    def test_RawFilter_search(self):
        filter_ = dict(ids=dict(type="my_type", values=["1", "4", "100"]))
        filter_string = json.dumps(filter_)

        self.assertEqual(Search(filter=RawFilter(filter_)).serialize(),
            dict(filter=filter_))
        self.assertEqual(Search(filter=RawFilter(filter_string)).serialize(),
            dict(filter=filter_))
예제 #3
0
 def test_RawFilter_string(self):
     filter_ = dict(ids=dict(type="my_type", values=["1", "4", "100"]))
     filter_string = json.dumps(filter_)
     self.assertEqual(RawFilter(filter_string), RawFilter(filter_string))
     self.assertEqual(RawFilter(filter_string), RawFilter(filter_))
     self.assertEqual(RawFilter(filter_string).serialize(), filter_)
     self.assertEqual(RawFilter(filter_string).serialize(),
         IdsFilter(type="my_type", values=["1", "4", "100"]).serialize())
예제 #4
0
 def test_RawFilter_string(self):
     filter_ = dict(ids=dict(type="my_type", values=["1", "4", "100"]))
     filter_string = json.dumps(filter_)
     self.assertEqual(RawFilter(filter_string), RawFilter(filter_string))
     self.assertEqual(RawFilter(filter_string), RawFilter(filter_))
     self.assertEqual(RawFilter(filter_string).serialize(), filter_)
     self.assertEqual(RawFilter(filter_string).serialize(),
         IdsFilter(type="my_type", values=["1", "4", "100"]).serialize())