-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exercíco 27: Habilita comportamentos na raiz do portal
- Loading branch information
1 parent
99805a8
commit 783887d
Showing
5 changed files
with
49 additions
and
2 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
16 changes: 16 additions & 0 deletions
16
backend/src/portal/governo/profiles/default/types/Plone_Site.xml
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,16 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<object xmlns:i18n="http://xml.zope.org/namespaces/i18n" | ||
meta_type="Dexterity FTI" | ||
name="Plone Site" | ||
i18n:domain="plone" | ||
> | ||
<!-- Enabled behaviors --> | ||
<property name="behaviors" | ||
purge="false" | ||
> | ||
<element value="portal.governo.behavior.contato" /> | ||
<element value="portal.governo.behavior.endereco" /> | ||
</property> | ||
|
||
|
||
</object> |
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,20 @@ | ||
import pytest | ||
|
||
|
||
CONTENT_TYPE = "Plone Site" | ||
|
||
|
||
class TestPloneSite: | ||
@pytest.fixture(autouse=True) | ||
def _setup(self, portal): | ||
self.portal = portal | ||
|
||
@pytest.mark.parametrize( | ||
"behavior", | ||
[ | ||
"portal.governo.behavior.contato", | ||
"portal.governo.behavior.endereco", | ||
], | ||
) | ||
def test_has_behavior(self, get_behaviors, behavior): | ||
assert behavior in get_behaviors(CONTENT_TYPE) |
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