Exemple #1
0
def test_merge_fail():

    e = Event("hi")

    try:
        e.merge(["two"])
    except InvalidData:
        assert True
    else:
        assert False
Exemple #2
0
def test_merge_list():

    e = Event(["one"])
    e.merge(["two"])

    assert e.dump()["data"] == ["one", "two"]
Exemple #3
0
def test_merge_dict():

    e = Event({"one": 1})
    e.merge({"two": 2})

    assert e.dump()["data"] == {"one": 1, "two": 2}