def METHOD_NAME(self):
    with self.assertRaises(TypeError):
        imghdr.what()
    with self.assertRaises(AttributeError):
        imghdr.what(None)
    with self.assertRaises(TypeError):
        imghdr.what(self.testfile, 1)
    with self.assertRaises(AttributeError):
        imghdr.what(os.fsencode(self.testfile))
    with open(self.testfile, 'rb') as f:
        with self.assertRaises(AttributeError):
            imghdr.what(f.fileno())