Skip to content

Commit

Permalink
Made the bbb_at imports conditional.
Browse files Browse the repository at this point in the history
Fall back to plone.app.testing.bbb, needed in plone.app.testing 5 or earlier.
#111
  • Loading branch information
mauritsvanrees committed Sep 28, 2018
1 parent be499a0 commit 45afdfc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
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.bbbt 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 45afdfc

Please sign in to comment.