-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from plone/thet-control-panel-url
Overview control panel url from context
- Loading branch information
Showing
6 changed files
with
58 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# -*- coding: utf-8 -*- | ||
from plone.app.registry.browser.controlpanel import ControlPanelFormWrapper | ||
from plone.app.registry.browser.records import RecordsControlPanel | ||
from plone.app.registry.testing import PLONE_APP_REGISTRY_INTEGRATION_TESTING | ||
|
||
import types | ||
import unittest2 as unittest | ||
|
||
|
||
class TestRegistryBaseControlpanel(unittest.TestCase): | ||
|
||
layer = PLONE_APP_REGISTRY_INTEGRATION_TESTING | ||
|
||
def test_registry_base_controlpanel__control_panel_url(self): | ||
"""Test, if control_panel_url property of the base controlpanel returns | ||
the correct url. | ||
""" | ||
view = ControlPanelFormWrapper(None, None) | ||
self.assertEqual( | ||
view.control_panel_url, | ||
u'http://nohost/plone/@@overview-controlpanel' | ||
) | ||
|
||
|
||
class TestRecordsControlPanel(unittest.TestCase): | ||
|
||
layer = PLONE_APP_REGISTRY_INTEGRATION_TESTING | ||
|
||
def test_records_control_panel__control_panel_url(self): | ||
"""Test, if control_panel_url property of the registry controlpanel | ||
returns the correct url. | ||
""" | ||
view = RecordsControlPanel(None, None) | ||
self.assertEqual( | ||
view.control_panel_url, | ||
u'http://nohost/plone/@@overview-controlpanel' | ||
) |