Example #1
0
def test_removeNoneValues():
    # WHEN a dict containing a value which is None
    d = {"a":"1", "b":2, "c":None}
    
    # THEN calling removeNoneValues(dict) will remove key-value pair
    # where value=None
    assert {"a":"1", "b":2} == removeNoneValues(d)
Example #2
0
def test_removeNoneValues():
    # WHEN a dict *not* containing a value which is None
    d = {"a":"1", "b":2, "c":3}

    # THEN calling removeNoneValues(dict) will not change dict
    assert d == removeNoneValues(d)