def test_from_dict(self): s = { "uid": 0, "gid": 0, "perm": 0o755, "accessed": 0.0, "modified": 0.0, "changed": 0.0 } assert isinstance(Node.from_dict(s), Node)
def test_serialisation(self): s = { "uid": 0, "gid": 0, "perm": 0o755, "accessed": 0.0, "modified": 0.0, "changed": 0.0 } n = Node.from_dict(s) assert s == n.to_dict(0, (0, ))