Skip to content

Commit

Permalink
Merge pull request #112 from plone/conditional-bbb-at-imports
Browse files Browse the repository at this point in the history
Made the bbb_at imports conditional.
  • Loading branch information
pbauer committed Sep 30, 2018
2 parents be499a0 + 4e961dc commit 6804a0f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Expand Up @@ -15,7 +15,8 @@ New features:
Bug fixes:

- Switch to new TestCase using AT after PloneTestcase is now DX.
[pbauer]
Fall back to the old TestCase in case of an older plone.app.testing.
[pbauer, maurits]


1.15.3 (2018-06-18)
Expand Down
6 changes: 5 additions & 1 deletion Products/Archetypes/tests/attestcase.py
@@ -1,4 +1,8 @@
from plone.app.testing import bbb_at
try:
from plone.app.testing import bbb_at
except ImportError:
# plone.app.testing 5 or earlier
from plone.app.testing import bbb as bbb_at
from plone.app.testing import FunctionalTesting, applyProfile
from Products.GenericSetup import EXTENSION, profile_registry

Expand Down
@@ -1,5 +1,9 @@
# -*- coding: utf-8 -*-
from plone.app.testing.bbb_at import PloneTestCase
try:
from plone.app.testing.bbb_at import PloneTestCase
except ImportError:
# plone.app.testing 5 or earlier
from plone.app.testing.bbb import PloneTestCase

from DateTime import DateTime

Expand Down
6 changes: 5 additions & 1 deletion Products/Archetypes/tests/test_interfaces.py
Expand Up @@ -48,7 +48,11 @@
StorageLayer, AttributeStorage, ObjectManagedStorage, MetadataStorage
from Products.Archetypes.atapi import registerType

from plone.app.testing.bbb_at import PTC_FUNCTIONAL_TESTING
try:
from plone.app.testing.bbb_at import PTC_FUNCTIONAL_TESTING
except ImportError:
# plone.app.testing 5 or earlier
from plone.app.testing.bbb import PTC_FUNCTIONAL_TESTING


def className(klass):
Expand Down

0 comments on commit 6804a0f

Please sign in to comment.