plone / plone.testing

Provides tools for writing unit and integration tests in a Zope and Plone environment. It is not tied to Plone, and it does not depend on Zope 2 (although it has some optional Zope 2-only features)
https://pypi.org/project/plone.testing/
3 stars 9 forks source link

Fix `clear_untrusted_proxy_headers` deprecation warning #78

Closed jugmac00 closed 3 years ago

jugmac00 commented 3 years ago

Fixes...

DeprecationWarning: In future versions of Waitress clear_untrusted_proxy_headers will be set to True by default. You may opt-out by setting this value to False, or opt-in explicitly by setting this to True.

fixes #77

Fix is analogous to https://github.com/plone/plone.recipe.zope2instance/issues/142

mister-roboto commented 3 years ago

@jugmac00 thanks for creating this Pull Request and help improve Plone!

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass.

Whenever you feel that the pull request is ready to be tested, either start all jenkins jobs pull requests by yourself, or simply add a comment in this pull request stating:

@jenkins-plone-org please run jobs

With this simple comment all the jobs will be started automatically.

Happy hacking!

jugmac00 commented 3 years ago

@jenkins-plone-org please run jobs

jugmac00 commented 3 years ago

@mauritsvanrees Could you have a look before I merge this?

jugmac00 commented 3 years ago

@mauritsvanrees There is one error - but not in this package's test suite, but in the test suite of plone.restapi.

plone.restapi.tests.test_services_types.TestServicesTypes.test_types_document_patch_one_field

'Author e-mail' != None

  File "/srv/python2.7/lib/python2.7/unittest/case.py", line 329, in run
    testMethod()
  File "/home/jenkins/workspace/pull-request-5.2/src/plone.restapi/src/plone/restapi/tests/test_services_types.py", line 260, in test_types_document_patch_one_field
    self.assertEqual("Author e-mail", response.json().get("title"))
  File "/srv/python2.7/lib/python2.7/unittest/case.py", line 513, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/srv/python2.7/lib/python2.7/unittest/case.py", line 506, in _baseAssertEqual
    raise self.failureException(msg)

I am not familiar with Jenkins and why even another package's test suite runs here.

Also I cannot judge whether the error has anything to do with the deprecation fix here.

jugmac00 commented 3 years ago

@ale-rt Thanks so much for your help!