[Checkins] [zopefoundation/Zope] dba5f6: In `str.format`, check the security for attributes...

GitHub noreply at github.com
Tue Jan 17 23:25:31 CET 2017


  Branch: refs/heads/str-format-213
  Home:   https://github.com/zopefoundation/Zope
  Commit: dba5f6cc3e03b18b068a207b24c5ce22b05792f7
      https://github.com/zopefoundation/Zope/commit/dba5f6cc3e03b18b068a207b24c5ce22b05792f7
  Author: Maurits van Rees <maurits at vanrees.org>
  Date:   2017-01-17 (Tue, 17 Jan 2017)

  Changed paths:
    M doc/CHANGES.rst
    A src/Zope2/App/safe_formatter.py
    M src/Zope2/App/startup.py
    A src/Zope2/App/tests/normal_zope3_page_template.pt
    A src/Zope2/App/tests/test_formatter.py
    A src/Zope2/App/tests/using_format_zope3_page_template.pt

  Log Message:
  -----------
  In `str.format`, check the security for attributes that are accessed.

Part of PloneHotfix20170117.


  Commit: f18cf2059b6e2e4f7c045ea381f9af0423f987ee
      https://github.com/zopefoundation/Zope/commit/f18cf2059b6e2e4f7c045ea381f9af0423f987ee
  Author: Maurits van Rees <maurits at vanrees.org>
  Date:   2017-01-17 (Tue, 17 Jan 2017)

  Changed paths:
    M src/Testing/ZopeTestCase/zopedoctest/functional.py

  Log Message:
  -----------
  Fixed dummy runTest on functional test case.

In functional doc tests you can apparently have a test case that has
no runTest method.  Until now the Testing package added a dummy
runTest method in that case, and set it to None.

The previous commit added a functional test case.  Somehow this caused
a problem in an unknown other functional test case because the dummy
runTest method got called:

  Error in test runTest (Testing.ZopeTestCase.ZopeTestCase.FunctionalTestCase)
  Traceback (most recent call last):
    File ".../lib/python2.7/unittest/case.py", line 329, in run
      testMethod()
  TypeError: 'NoneType' object is not callable

It was not even caused by anything in the new tests: simply importing
was enough to trigger it:

  from Testing.ZopeTestCase import FunctionalTestCase

So this has something to do with the order in which tests are found.

I fixed it by making the dummy runTest method callable.


Compare: https://github.com/zopefoundation/Zope/compare/dba5f6cc3e03^...f18cf2059b6e


More information about the checkins mailing list