'Minimal tests for a few basic file system operations.'

def test_webhdfs(self):

    fs = self.cluster.fs
    test_file = (self.prefix + '/fortest.txt')
    f = fs.open(test_file, 'w')
    try:
        f.write('hello')
        f.close()
        assert_equals('hello', fs.open(test_file).read())
        assert_equals(5, fs.stats(test_file)['size'])
        assert_true(fs.isfile(test_file))
        assert_false(fs.isfile('/'))
        assert_true(fs.isdir('/'))
        assert_false(fs.isdir(test_file))
    finally:
        fs.remove(test_file)
