def execute(event: Dict[str, str], context): logger.info("Starting service") data: Dict[str, str] = Funcs.decode(event.get("data")) attrs: Dict[str, str] = event.get("attributes") sf: SalesforceBroker = SalesforceBroker() sf.handle(data)
def test_decode_dict(): assert { "app": "brandenburg" } == Funcs.decode("eyJhcHAiOiJicmFuZGVuYnVyZyJ9")
def test_not_b64_string(): assert "abc123" == Funcs.decode("abc123")
def test_decode_string(): assert "brandenburg" == Funcs.decode("YnJhbmRlbmJ1cmc=")