':py:obj:`X509ReqType.set_version` raises :py:obj:`TypeError` if called with the wrong
number of arguments or with a non-:py:obj:`int` argument.
:py:obj:`X509ReqType.get_version` raises :py:obj:`TypeError` if called with any
arguments.'

def test_version_wrong_args(self):

    request = X509Req()
    self.assertRaises(TypeError, request.set_version)
    self.assertRaises(TypeError, request.set_version, 'foo')
    self.assertRaises(TypeError, request.set_version, 1, 2)
    self.assertRaises(TypeError, request.get_version, None)
