diff --git a/django/website/rest_api/tests/counts_per_term_tests.py b/django/website/rest_api/tests/counts_per_term_tests.py index ca556ce4a0628d696b426a7c969caddceb32ef46..8c674c909f24924bf345289344c83d3eb19ecbf8 100644 --- a/django/website/rest_api/tests/counts_per_term_tests.py +++ b/django/website/rest_api/tests/counts_per_term_tests.py @@ -75,3 +75,15 @@ def test_term_count_only_contains_terms_in_taxonomy(questions_category, assert updates['name'] in names assert monrovia['name'] not in names + + +@pytest.mark.django_db +def test_term_count_contains_taxonomy_term_name(questions_category): + origin1 = create_item(body="What was the caused of ebola outbreak in liberia?").data + origins = add_term(taxonomy=questions_category['slug'], name="Test Origins").data + categorize_item(origin1, origins) + + terms = get_term_count(questions_category).data + [name] = [term['name'] for term in terms] + + assert origins['name'] == name