Skip to content

Commit

Permalink
Exercício 17: Testes de backend
Browse files Browse the repository at this point in the history
  • Loading branch information
jadirj committed Oct 10, 2024
1 parent a278a8b commit 53bea05
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions backend/tests/setup/test_portal_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"""Portal settings tests."""

from plone import api

import pytest


class TestPortalSettings:
"""Test that Portal configuration is correctly done."""

@pytest.mark.parametrize(
"key,expected",
[
["plone.site_title", "Intranet do TRE-PR"],
["plone.email_from_name", "E-mail da Intranet do TRE-PR"],
["plone.smtp_host", "localhost"],
["plone.smtp_port", 25],
],
)
def test_setting(self, portal, key: str, expected: str):
"""Test portal title."""
value = api.portal.get_registry_record(key)
assert value == expected

0 comments on commit 53bea05

Please sign in to comment.