':py:obj:`X509Req.add_extensions` raises :py:obj:`TypeError` if called with the wrong
number of arguments or with a non-:py:obj:`list`.  Or it raises :py:obj:`ValueError`
if called with a :py:obj:`list` containing objects other than :py:obj:`X509Extension`
instances.'

def test_add_extensions_wrong_args(self):

    request = X509Req()
    self.assertRaises(TypeError, request.add_extensions)
    self.assertRaises(TypeError, request.add_extensions, object())
    self.assertRaises(ValueError, request.add_extensions, [object()])
    self.assertRaises(TypeError, request.add_extensions, [], None)
