示例#1
0
 def test_dct_search(self):
     dyn1 = DynamicField(name="SomeName",
                         search_patterns=["foo", "bar"],
                         search_operator="Equals")
     self.assertEqual(dyn1.to_dct_search(),
                      {"DynamicField_SomeName": {
                          "Equals": ["foo", "bar"]
                      }})
示例#2
0
 def test_dct_search_date(self):
     dyn1 = DynamicField(name="SomeDate",
                         search_patterns=[datetime(2011, 1, 1)],
                         search_operator="GreaterThan")
     self.assertEqual(dyn1.to_dct_search(), {
         "DynamicField_SomeDate": {
             "GreaterThan": ["2011-01-01 00:00:00"]
         }
     })