test that keyfile can be None

--HG--
branch : 2.7
extra : source : b9d9e7762783c87a31cefe7601877377280f644f
allow keyfile argument to be None (closes #22787)

--HG--
branch : 2.7