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