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 QA validations and units tests #33
- Loading branch information
1 parent
f697fa4
commit 0a158d8
Showing
12 changed files
with
154 additions
and
27 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,4 +1,5 @@ | ||
-c constraints.txt | ||
-e src/slc_web | ||
-e src/slc_web[test] | ||
|
||
zope.testrunner | ||
|
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 |
---|---|---|
|
@@ -4,6 +4,8 @@ | |
import logging | ||
|
||
|
||
PACKAGE_NAME = "slc_web" | ||
|
||
_ = MessageFactory("slc_web") | ||
|
||
logger = logging.getLogger("slc_web") |
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
File renamed without changes.
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
28 changes: 28 additions & 0 deletions
28
backend/src/slc_web/src/slc_web/tests/test_ct_community_sponsor.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,28 @@ | ||
"""Content Types tests for this package.""" | ||
from plone.app.testing import setRoles | ||
from plone.app.testing import TEST_USER_ID | ||
from plone.dexterity.interfaces import IDexterityFTI | ||
from slc_web.testing import SLC_WEB_INTEGRATION_TESTING | ||
from zope.component import queryUtility | ||
|
||
import unittest | ||
|
||
|
||
class ContentTypesTest(unittest.TestCase): | ||
"""The Community Sponsor Content Type Test class | ||
Args: | ||
unittest (class): unittest TestCase | ||
""" | ||
|
||
layer = SLC_WEB_INTEGRATION_TESTING | ||
|
||
def setUp(self): | ||
"""Custom shared utility setup for tests.""" | ||
self.portal = self.layer["portal"] | ||
setRoles(self.portal, TEST_USER_ID, ["Manager"]) | ||
|
||
def test_fti_community_sponsor(self): | ||
fti = queryUtility(IDexterityFTI, name="CommunitySponsor") | ||
self.assertTrue(fti) | ||
# self.assertNotEqual(None, fti) |
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