test: adjust self.publish() tests for Zope4

self.publish() had a bug regarding status code for empty responses on
Zope2 and that bug was fixed in Zope4, this adjust the code to support
both versions.
2 jobs for zope4py2
Status Job ID Name Coverage
  External
running SlapOS-Master.UnitTest-Zope4py2

15649:55:48

running Wendelin.UnitTest-zope4py2

15649:54:32