Skip to content

Commit

Permalink
Blacked files
Browse files Browse the repository at this point in the history
  • Loading branch information
boulch committed Jul 4, 2023
1 parent b8fc794 commit e803a68
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/library/__init__.py
@@ -1,2 +1,2 @@
# -*- coding: utf-8 -*-
__import__('pkg_resources').declare_namespace(__name__)
__import__("pkg_resources").declare_namespace(__name__)
2 changes: 1 addition & 1 deletion src/library/policy/__init__.py
Expand Up @@ -3,4 +3,4 @@
from zope.i18nmessageid import MessageFactory


_ = MessageFactory('library.policy')
_ = MessageFactory("library.policy")
2 changes: 1 addition & 1 deletion src/library/policy/setuphandlers.py
Expand Up @@ -92,7 +92,7 @@ def add_taxonomies():
def add_stucture(portal):
# Folder professionals
if "explorer" not in portal:
obj = create_content("Folder", _(u"explorer"), portal)
obj = create_content("Folder", _("explorer"), portal)
_activate_dashboard_navigation(obj, True, "/faceted/config/explorer.xml")
explorer_layout = FacetedLayout(obj)
explorer_layout.update_layout(layout="faceted-explorer")
Expand Down
9 changes: 4 additions & 5 deletions src/library/policy/testing.py
Expand Up @@ -11,7 +11,6 @@


class LibraryPolicyLayer(PloneSandboxLayer):

defaultBases = (PLONE_APP_CONTENTTYPES_FIXTURE,)

def setUpZope(self, app, configurationContext):
Expand All @@ -21,21 +20,21 @@ def setUpZope(self, app, configurationContext):
self.loadZCML(package=library.policy)

def setUpPloneSite(self, portal):
applyProfile(portal, 'library.policy:default')
applyProfile(portal, "library.policy:default")


LIBRARY_POLICY_FIXTURE = LibraryPolicyLayer()


LIBRARY_POLICY_INTEGRATION_TESTING = IntegrationTesting(
bases=(LIBRARY_POLICY_FIXTURE,),
name='LibraryPolicyLayer:IntegrationTesting',
name="LibraryPolicyLayer:IntegrationTesting",
)


LIBRARY_POLICY_FUNCTIONAL_TESTING = FunctionalTesting(
bases=(LIBRARY_POLICY_FIXTURE,),
name='LibraryPolicyLayer:FunctionalTesting',
name="LibraryPolicyLayer:FunctionalTesting",
)


Expand All @@ -45,5 +44,5 @@ def setUpPloneSite(self, portal):
REMOTE_LIBRARY_BUNDLE_FIXTURE,
z2.ZSERVER_FIXTURE,
),
name='LibraryPolicyLayer:AcceptanceTesting',
name="LibraryPolicyLayer:AcceptanceTesting",
)
21 changes: 12 additions & 9 deletions src/library/policy/tests/test_robot.py
Expand Up @@ -11,18 +11,21 @@
def test_suite():
suite = unittest.TestSuite()
current_dir = os.path.abspath(os.path.dirname(__file__))
robot_dir = os.path.join(current_dir, 'robot')
robot_dir = os.path.join(current_dir, "robot")
robot_tests = [
os.path.join('robot', doc) for doc in os.listdir(robot_dir)
if doc.endswith('.robot') and doc.startswith('test_')
os.path.join("robot", doc)
for doc in os.listdir(robot_dir)
if doc.endswith(".robot") and doc.startswith("test_")
]
for robot_test in robot_tests:
robottestsuite = robotsuite.RobotTestSuite(robot_test)
robottestsuite.level = ROBOT_TEST_LEVEL
suite.addTests([
layered(
robottestsuite,
layer=LIBRARY_POLICY_ACCEPTANCE_TESTING,
),
])
suite.addTests(
[
layered(
robottestsuite,
layer=LIBRARY_POLICY_ACCEPTANCE_TESTING,
),
]
)
return suite
1 change: 0 additions & 1 deletion src/library/policy/tests/test_setup.py
Expand Up @@ -32,7 +32,6 @@ def test_browserlayer(self):


class TestUninstall(unittest.TestCase):

layer = LIBRARY_POLICY_INTEGRATION_TESTING

def setUp(self):
Expand Down

0 comments on commit e803a68

Please sign in to comment.