Skip to content

Commit

Permalink
[fc] Repository: plone.protect
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2018-09-30T20:12:33+02:00
Author: Philip Bauer (pbauer) <bauer@starzel.de>
Commit: plone/plone.protect@e67c39c

fix test that fails with new ZMI (that has 2 forms)

Files changed:
M plone/protect/tests/testPatches.py
Repository: plone.protect

Branch: refs/heads/master
Date: 2018-09-30T23:45:49+02:00
Author: Philip Bauer (pbauer) <bauer@starzel.de>
Commit: plone/plone.protect@07fd488

Merge pull request #83 from plone/fix_zmi_test

fix test that fails with new ZMI (that has 2 forms)

Files changed:
M plone/protect/tests/testPatches.py
  • Loading branch information
pbauer committed Sep 30, 2018
1 parent 595c844 commit 5e35e48
Showing 1 changed file with 14 additions and 23 deletions.
37 changes: 14 additions & 23 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,41 +1,32 @@
Repository: Products.Archetypes
Repository: plone.protect


Branch: refs/heads/master
Date: 2018-09-28T11:23:27+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: https://github.com/plone/Products.Archetypes/commit/4e961dc9254b28f9d250096c6132c974cc82bcb4

Made the bbb_at imports conditional.
Date: 2018-09-30T20:12:33+02:00
Author: Philip Bauer (pbauer) <bauer@starzel.de>
Commit: https://github.com/plone/plone.protect/commit/e67c39c969fee4b24dce78effc36a293feb9ea92

Fall back to plone.app.testing.bbb, needed in plone.app.testing 5 or earlier.
https://github.com/plone/Products.Archetypes/pull/111
fix test that fails with new ZMI (that has 2 forms)

Files changed:
M CHANGES.rst
M Products/Archetypes/tests/attestcase.py
M Products/Archetypes/tests/test_date_components_support_script.py
M Products/Archetypes/tests/test_interfaces.py
M plone/protect/tests/testPatches.py

b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex 24846599..e929c422 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -15,7 +15,8 @@ New features:\n Bug fixes:\n \n - Switch to new TestCase using AT after PloneTestcase is now DX.\n- [pbauer]\n+ Fall back to the old TestCase in case of an older plone.app.testing.\n+ [pbauer, maurits]\n \n \n 1.15.3 (2018-06-18)\ndiff --git a/Products/Archetypes/tests/attestcase.py b/Products/Archetypes/tests/attestcase.py\nindex 96756869..a7396d7e 100644\n--- a/Products/Archetypes/tests/attestcase.py\n+++ b/Products/Archetypes/tests/attestcase.py\n@@ -1,4 +1,8 @@\n-from plone.app.testing import bbb_at\n+try:\n+ from plone.app.testing import bbb_at\n+except ImportError:\n+ # plone.app.testing 5 or earlier\n+ from plone.app.testing import bbb as bbb_at\n from plone.app.testing import FunctionalTesting, applyProfile\n from Products.GenericSetup import EXTENSION, profile_registry\n \ndiff --git a/Products/Archetypes/tests/test_date_components_support_script.py b/Products/Archetypes/tests/test_date_components_support_script.py\nindex cc310102..97702818 100644\n--- a/Products/Archetypes/tests/test_date_components_support_script.py\n+++ b/Products/Archetypes/tests/test_date_components_support_script.py\n@@ -1,5 +1,9 @@\n # -*- coding: utf-8 -*-\n-from plone.app.testing.bbb_at import PloneTestCase\n+try:\n+ from plone.app.testing.bbb_at import PloneTestCase\n+except ImportError:\n+ # plone.app.testing 5 or earlier\n+ from plone.app.testing.bbb import PloneTestCase\n \n from DateTime import DateTime\n \ndiff --git a/Products/Archetypes/tests/test_interfaces.py b/Products/Archetypes/tests/test_interfaces.py\nindex c3d2c1e8..be03a42c 100644\n--- a/Products/Archetypes/tests/test_interfaces.py\n+++ b/Products/Archetypes/tests/test_interfaces.py\n@@ -48,7 +48,11 @@\n StorageLayer, AttributeStorage, ObjectManagedStorage, MetadataStorage\n from Products.Archetypes.atapi import registerType\n \n-from plone.app.testing.bbb_at import PTC_FUNCTIONAL_TESTING\n+try:\n+ from plone.app.testing.bbb_at import PTC_FUNCTIONAL_TESTING\n+except ImportError:\n+ # plone.app.testing 5 or earlier\n+ from plone.app.testing.bbb import PTC_FUNCTIONAL_TESTING\n \n \n def className(klass):\n'
b"diff --git a/plone/protect/tests/testPatches.py b/plone/protect/tests/testPatches.py\nindex fe59ae2..410d31e 100644\n--- a/plone/protect/tests/testPatches.py\n+++ b/plone/protect/tests/testPatches.py\n@@ -29,7 +29,7 @@ def test_change_password_on_root_does_not_throw_other_csrf_protection(\n )\n self.browser.getControl(name='password').value = SITE_OWNER_PASSWORD\n self.browser.getControl(name='confirm').value = SITE_OWNER_PASSWORD\n- self.browser.getForm().submit()\n+ self.browser.getForm(action='manage_updateUserPassword').submit()\n self.assertEquals(\n self.browser.url,\n '%s/acl_users/users/manage_users?'\n"

Repository: Products.Archetypes
Repository: plone.protect


Branch: refs/heads/master
Date: 2018-09-30T07:19:40+02:00
Date: 2018-09-30T23:45:49+02:00
Author: Philip Bauer (pbauer) <bauer@starzel.de>
Commit: https://github.com/plone/Products.Archetypes/commit/6804a0f3aae9d326b8169792ca98483ec713d3c3
Commit: https://github.com/plone/plone.protect/commit/07fd4889ecf041fac2413e2dddc0239911505f3b

Merge pull request #112 from plone/conditional-bbb-at-imports
Merge pull request #83 from plone/fix_zmi_test

Made the bbb_at imports conditional.
fix test that fails with new ZMI (that has 2 forms)

Files changed:
M CHANGES.rst
M Products/Archetypes/tests/attestcase.py
M Products/Archetypes/tests/test_date_components_support_script.py
M Products/Archetypes/tests/test_interfaces.py
M plone/protect/tests/testPatches.py

b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex 24846599..e929c422 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -15,7 +15,8 @@ New features:\n Bug fixes:\n \n - Switch to new TestCase using AT after PloneTestcase is now DX.\n- [pbauer]\n+ Fall back to the old TestCase in case of an older plone.app.testing.\n+ [pbauer, maurits]\n \n \n 1.15.3 (2018-06-18)\ndiff --git a/Products/Archetypes/tests/attestcase.py b/Products/Archetypes/tests/attestcase.py\nindex 96756869..a7396d7e 100644\n--- a/Products/Archetypes/tests/attestcase.py\n+++ b/Products/Archetypes/tests/attestcase.py\n@@ -1,4 +1,8 @@\n-from plone.app.testing import bbb_at\n+try:\n+ from plone.app.testing import bbb_at\n+except ImportError:\n+ # plone.app.testing 5 or earlier\n+ from plone.app.testing import bbb as bbb_at\n from plone.app.testing import FunctionalTesting, applyProfile\n from Products.GenericSetup import EXTENSION, profile_registry\n \ndiff --git a/Products/Archetypes/tests/test_date_components_support_script.py b/Products/Archetypes/tests/test_date_components_support_script.py\nindex cc310102..97702818 100644\n--- a/Products/Archetypes/tests/test_date_components_support_script.py\n+++ b/Products/Archetypes/tests/test_date_components_support_script.py\n@@ -1,5 +1,9 @@\n # -*- coding: utf-8 -*-\n-from plone.app.testing.bbb_at import PloneTestCase\n+try:\n+ from plone.app.testing.bbb_at import PloneTestCase\n+except ImportError:\n+ # plone.app.testing 5 or earlier\n+ from plone.app.testing.bbb import PloneTestCase\n \n from DateTime import DateTime\n \ndiff --git a/Products/Archetypes/tests/test_interfaces.py b/Products/Archetypes/tests/test_interfaces.py\nindex c3d2c1e8..be03a42c 100644\n--- a/Products/Archetypes/tests/test_interfaces.py\n+++ b/Products/Archetypes/tests/test_interfaces.py\n@@ -48,7 +48,11 @@\n StorageLayer, AttributeStorage, ObjectManagedStorage, MetadataStorage\n from Products.Archetypes.atapi import registerType\n \n-from plone.app.testing.bbb_at import PTC_FUNCTIONAL_TESTING\n+try:\n+ from plone.app.testing.bbb_at import PTC_FUNCTIONAL_TESTING\n+except ImportError:\n+ # plone.app.testing 5 or earlier\n+ from plone.app.testing.bbb import PTC_FUNCTIONAL_TESTING\n \n \n def className(klass):\n'
b"diff --git a/plone/protect/tests/testPatches.py b/plone/protect/tests/testPatches.py\nindex fe59ae2..410d31e 100644\n--- a/plone/protect/tests/testPatches.py\n+++ b/plone/protect/tests/testPatches.py\n@@ -29,7 +29,7 @@ def test_change_password_on_root_does_not_throw_other_csrf_protection(\n )\n self.browser.getControl(name='password').value = SITE_OWNER_PASSWORD\n self.browser.getControl(name='confirm').value = SITE_OWNER_PASSWORD\n- self.browser.getForm().submit()\n+ self.browser.getForm(action='manage_updateUserPassword').submit()\n self.assertEquals(\n self.browser.url,\n '%s/acl_users/users/manage_users?'\n"

0 comments on commit 5e35e48

Please sign in to comment.