Skip to content

Commit

Permalink
Update test_language
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Mar 14, 2022
1 parent 96612bb commit ea41479
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,23 @@ def survey_id(client: citric.Client) -> Generator[int, None, None]:


@pytest.mark.integration_test
def test_add_language(client: citric.Client, survey_id: int):
"""Test adding a new language to a survey."""
def test_language(client: citric.Client, survey_id: int):
"""Test language methods."""
# Add a new language
client.add_language(survey_id, "es")
client.add_language(survey_id, "ru")

survey_props = client.get_survey_properties(survey_id)
assert survey_props["additional_languages"] == "es ru"

# Get language properties
language_props = client.get_language_properties(survey_id, language="es")
assert language_props["surveyls_email_register_subj"] is not None
assert language_props["surveyls_email_invite"] is not None

client.delete_language(survey_id, "ru")
# Delete a language
response = client.delete_language(survey_id, "ru")
assert response["status"] == "OK"
assert survey_props["additional_languages"] == "es"


Expand Down

0 comments on commit ea41479

Please sign in to comment.