forked from macagua/slc-sitioweb
-
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.
Added the industry field as a vocabulary #33
- Loading branch information
1 parent
5f7fb9a
commit dfdef96
Showing
8 changed files
with
88 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: PACKAGE VERSION\n" | ||
"POT-Creation-Date: YEAR-MO-DA HO:MI +ZONE\n" | ||
"POT-Creation-Date: 2023-07-26 02:53+0000\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
|
@@ -180,6 +180,14 @@ msgstr "" | |
msgid "Indico profile." | ||
msgstr "" | ||
|
||
#: slc_web/schema/communitysponsor.xml | ||
msgid "Industry" | ||
msgstr "" | ||
|
||
#: slc_web/schema/communitysponsor.xml | ||
msgid "Industry sector to which it belongs" | ||
msgstr "" | ||
|
||
#: slc_web/schema/communitysponsor.xml | ||
msgid "Information" | ||
msgstr "" | ||
|
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 |
---|---|---|
|
@@ -3,8 +3,8 @@ | |
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: slc_web\n" | ||
"POT-Creation-Date: YEAR-MO-DA HO:MI +ZONE\n" | ||
"PO-Revision-Date: 2023-07-24 14:49-0600\n" | ||
"POT-Creation-Date: 2023-07-26 02:53+0000\n" | ||
"PO-Revision-Date: 2023-07-25 21:42-0400\n" | ||
"Last-Translator: Leonardo J. Caballero G. <[email protected]>\n" | ||
"Language-Team: ES <[email protected]>\n" | ||
"MIME-Version: 1.0\n" | ||
|
@@ -185,6 +185,14 @@ msgstr "Indico" | |
msgid "Indico profile." | ||
msgstr "Perfil Indico." | ||
|
||
#: slc_web/schema/communitysponsor.xml | ||
msgid "Industry" | ||
msgstr "Industria" | ||
|
||
#: slc_web/schema/communitysponsor.xml | ||
msgid "Industry sector to which it belongs" | ||
msgstr "Sector industrial al que pertenece" | ||
|
||
#: slc_web/schema/communitysponsor.xml | ||
msgid "Information" | ||
msgstr "Información" | ||
|
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: PACKAGE VERSION\n" | ||
"POT-Creation-Date: 2023-07-24 20:49+0000\n" | ||
"POT-Creation-Date: 2023-07-26 02:53+0000\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
|
@@ -183,6 +183,14 @@ msgstr "" | |
msgid "Indico profile." | ||
msgstr "" | ||
|
||
#: slc_web/src/slc_web/schema/communitysponsor.xml | ||
msgid "Industry" | ||
msgstr "" | ||
|
||
#: slc_web/src/slc_web/schema/communitysponsor.xml | ||
msgid "Industry sector to which it belongs" | ||
msgstr "" | ||
|
||
#: slc_web/src/slc_web/schema/communitysponsor.xml | ||
msgid "Information" | ||
msgstr "" | ||
|
@@ -370,7 +378,7 @@ msgid "Skills" | |
msgstr "" | ||
|
||
#: slc_web/src/slc_web/schema/communitymember.xml | ||
msgid "Skills of the community member. | ||
msgid "Skills of the community member. | ||
Select different skills pushing Ctrl + Click." | ||
msgstr "" | ||
|
||
|
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
43 changes: 43 additions & 0 deletions
43
backend/src/slc_web/src/slc_web/tests/test_vocabularies.py
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,43 @@ | ||
"""Vocabularies tests for this package.""" | ||
from slc_web import PACKAGE_NAME | ||
from slc_web.testing import SLC_WEB_INTEGRATION_TESTING | ||
from slc_web.vocabularies import industries_vocabulary | ||
from zope.component import getUtility | ||
from zope.schema.interfaces import IVocabularyFactory | ||
|
||
import unittest | ||
|
||
|
||
class IndustriesVocabularyTest(unittest.TestCase): | ||
"""Test fot the slc_web Vocabularies. | ||
Args: | ||
unittest (class): unittest TestCase | ||
""" | ||
|
||
layer = SLC_WEB_INTEGRATION_TESTING | ||
|
||
def setUp(self): | ||
"""Custom shared utility setup for tests.""" | ||
self.portal = self.layer["portal"] | ||
|
||
def test_vocabulary(self): | ||
"""Check that the vocabulary exists.""" | ||
self.assertTrue(industries_vocabulary) | ||
|
||
def test_vocabulary_industries_total(self): | ||
"""Checkout the industries vocabulary total size.""" | ||
factory = getUtility( | ||
IVocabularyFactory, f"{PACKAGE_NAME}.vocabulary.industries" | ||
) | ||
vocabulary = factory(self.portal) | ||
self.assertEqual(len(vocabulary), 7) | ||
|
||
def test_vocabulary_industry_exits(self): | ||
"""Check that 'NGO' item is in the vocabulary.""" | ||
factory = getUtility( | ||
IVocabularyFactory, f"{PACKAGE_NAME}.vocabulary.industries" | ||
) | ||
vocabulary = factory(self.portal) | ||
industries = [industry.title for industry in vocabulary] | ||
self.assertIn("NGO", industries) |
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 |
---|---|---|
@@ -1,10 +1,9 @@ | ||
<configure xmlns="http://namespaces.zope.org/zope"> | ||
|
||
<!-- Example vocabulary | ||
<!-- Custom vocabularies --> | ||
<utility | ||
name="slc_web.vocabulary.industries" | ||
component=".industries_vocabulary" | ||
/> | ||
--> | ||
|
||
</configure> |
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