def test_event_render_error(): e = Event({"one": 1, "two": 2}) try: e.render("{{data.one} is a number and so is {{data.two}}") except InvalidData: assert True else: assert False
def test_event_render(): e = Event({"one": 1, "two": 2}) assert e.render("{{data.one}} is a number and so is {{data.two}}") == "1 is a number and so is 2"