def test_update(): data = { "foo": "bar", "a": "b", "c": "d", } sd = SecureDict(priv_rsa, pub_rsa) sd.update(data) for k, v in data.items(): assert v != sd.export()[k] assert v == sd[k]
def test_multi_types(): data = { "a": 1, "b": ("a", 5), "c": None, "d": {"foo": "bar"}, "e": 192.1223411231, } sd = SecureDict(priv_rsa, pub_rsa) sd.update(data) for k, v in data.items(): assert v != sd.export()[k] assert v == sd[k]