Skip to content

Commit

Permalink
[fc] Repository: Products.Archetypes
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2018-09-28T11:23:27+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/Products.Archetypes@4e961dc

Made the bbb_at imports conditional.

Fall back to plone.app.testing.bbb, needed in plone.app.testing 5 or earlier.
plone/Products.Archetypes#111

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
Repository: Products.Archetypes

Branch: refs/heads/master
Date: 2018-09-30T07:19:40+02:00
Author: Philip Bauer (pbauer) <bauer@starzel.de>
Commit: plone/Products.Archetypes@6804a0f

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

Made the bbb_at imports conditional.

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
  • Loading branch information
pbauer committed Sep 30, 2018
1 parent 7606ceb commit fccf316
Showing 1 changed file with 33 additions and 7 deletions.
40 changes: 33 additions & 7 deletions last_commit.txt
@@ -1,15 +1,41 @@
Repository: plone.app.contentrules
Repository: Products.Archetypes


Branch: refs/heads/master
Date: 2018-09-29T09:00:55-04:00
Author: David Glick (davisagli) <david@glicksoftware.com>
Commit: https://github.com/plone/plone.app.contentrules/commit/f92ce755903d501c8fbf4ae50c67273a3a4045bb
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

fix test
Made the bbb_at imports conditional.

Fall back to plone.app.testing.bbb, needed in plone.app.testing 5 or earlier.
https://github.com/plone/Products.Archetypes/pull/111

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

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'

Repository: Products.Archetypes


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

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

Made the bbb_at imports conditional.

Files changed:
M plone/app/contentrules/tests/test_action_mail.py
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

b'diff --git a/plone/app/contentrules/tests/test_action_mail.py b/plone/app/contentrules/tests/test_action_mail.py\nindex 4a9e4a2..adfa21c 100644\n--- a/plone/app/contentrules/tests/test_action_mail.py\n+++ b/plone/app/contentrules/tests/test_action_mail.py\n@@ -199,7 +199,8 @@ def testExecuteMultiRecipients(self):\n for msg in dummyMailHost.messages:\n if \'bar@foo.be\' in msg:\n mailSent1 = message_from_string(msg)\n- mailSent2 = message_from_string(msg)\n+ else:\n+ mailSent2 = message_from_string(msg)\n self.assertEqual(\'text/plain; charset="utf-8"\',\n mailSent1.get(\'Content-Type\'))\n self.assertEqual(\'bar@foo.be\', mailSent1.get(\'To\'))\n'
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'

0 comments on commit fccf316

Please sign in to comment.