def test_fchown(self):
     tmpdir = mkdtemp()
     try:
         fd, tmpfile = mkstemp(dir=tmpdir)
         buf = os.stat(tmpfile)
         if buf.st_uid == 0:
             raise SkipTest
         else:
             try:
                 fs.do_fchown(fd, 20000, 20000)
             except SwiftOnFileSystemOSError as ex:
                 if ex.errno != errno.EPERM:
                     self.fail(
                         "Expected SwiftOnFileSystemOSError(errno=EPERM)")
             else:
                 self.fail("Expected SwiftOnFileSystemOSError")
     finally:
         os.close(fd)
         shutil.rmtree(tmpdir)