def test_merge_fail(): e = Event("hi") try: e.merge(["two"]) except InvalidData: assert True else: assert False
def test_merge_list(): e = Event(["one"]) e.merge(["two"]) assert e.dump()["data"] == ["one", "two"]
def test_merge_dict(): e = Event({"one": 1}) e.merge({"two": 2}) assert e.dump()["data"] == {"one": 1, "two": 2}