Example #1
0
 def test_filters(self):
     data = {"filters": ["name=italian", "category=Restaurants"]}
     communication._preprocess(data)
     self.assertEqual(data["filters"], {
         "name": "italian",
         "category": "restaurants"
     })
Example #2
0
 def test_default_category_filter(self):
     data = {"filters": ["category=unspecified"]}
     communication._preprocess(data)
     self.assertEqual(data["filters"], {"category": None})
Example #3
0
 def test_date_format(self):
     data = {"date": "31.01."}
     communication._preprocess(data, date_format="%d.%m.")
     self.assertDictEqual(data, {"date": "01-31"})