def test_setcontents(tmppath): """Test setcontents.""" fs = XRootDFS(mkurl(tmppath)) fs.setcontents('data/testa.txt', "mytest") assert fs.getcontents('data/testa.txt') == "mytest"
def test_getcontents(tmppath): """Test getcontents.""" fs = XRootDFS(mkurl(tmppath)) assert fs.getcontents('data/testa.txt') == "testa.txt\n" pytest.raises(ResourceNotFoundError, fs.getcontents, 'data/invalid.txt')