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

10551:27:53

running Wendelin.UnitTest-zope4py2

10551:26:37