def test_nest_no_keys(self): temp = {} keys = [] value = "2" dict.nest(temp, keys, value) assert len(temp) == 0
def test_nest_single_key(self): temp = {} key = "one" value = "two" dict.nest(temp, key.split("."), value) assert temp["one"] == value
def test_nest_two_keys(self): temp = {} key = "one.two" value = "2" dict.nest(temp, key.split("."), value) assert temp["one"]["two"] == value
def test_nest_happy(self): temp = {} key = "one.two.three" value = 3 test = dict.nest(temp, key.split("."), value) assert temp["one"]["two"]["three"] == value
def test_nest_none_keys(self): dict.nest(None, None, None) #if we get any errors the test will fail assert True