def test_file(self):
        arg = formmethod.File("name", allowNone=0)
        self.assertEqual(arg.coerce("something"), "something")
        self.assertRaises(formmethod.InputError, arg.coerce, None)
        arg2 = formmethod.File("name")
        self.assertEqual(arg2.coerce(None), None)
Test the correctness of the coerce function.
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/test/test_formmethod.py/ArgumentTestCase.test_file