def test_get_subscribe_attributes(self): req_data = { 'Attribute.entry.1.key': ['RawMessageDelivery'], 'Attribute.entry.1.value': ['true'], 'Attribute.entry.2.key': ['FilterPolicy'], 'Attribute.entry.2.value': ['{"type": ["foo", "bar"]}'] } attributes = sns_listener.get_subscribe_attributes(req_data) self.assertDictEqual( attributes, { 'RawMessageDelivery': 'true', 'FilterPolicy': '{"type": ["foo", "bar"]}' })
def test_get_subscribe_attributes(self): req_data = { "Attribute.entry.1.key": ["RawMessageDelivery"], "Attribute.entry.1.value": ["true"], "Attribute.entry.2.key": ["FilterPolicy"], "Attribute.entry.2.value": ['{"type": ["foo", "bar"]}'], } attributes = sns_listener.get_subscribe_attributes(req_data) expected = { "RawMessageDelivery": "true", "PendingConfirmation": "false", "FilterPolicy": '{"type": ["foo", "bar"]}', } self.assertDictEqual(attributes, expected)