xref: /OK3568_Linux_fs/buildroot/support/testing/tests/package/sample_python_augeas.py (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1import augeas
2
3a = augeas.Augeas(root="/")
4hosts = a.match("/files/etc/hosts/*")
5assert(hosts is not None)
6assert(len(hosts) == 2)
7
8assert(a.get("/files/etc/hosts/1/ipaddr") == "127.0.0.1")
9assert(a.get("/files/etc/hosts/1/canonical") == "localhost")
10