Skip to content
Snippets Groups Projects
Commit 15d45df6 authored by Martin Burchell's avatar Martin Burchell
Browse files

Enabled data_layer test for applying multiple tags

parent 6fd1a604
No related branches found
No related tags found
2 merge requests!46Tagging frontend,!45Add multiple terms api
......@@ -130,15 +130,14 @@ def test_apply_term_replaces_term_for_categories():
item.apply_term(term2)
assert list(item.terms.all()) == [term2]
@pytest.mark.xfail
# I'm putting this here to explain some of my thinking.
@pytest.mark.django_db
def test_apply_term_adds_term_for_tags():
item = ItemFactory()
taxonomy = TaxonomyFactory() # Ensure multiplicity == multiple
taxonomy = TaxonomyFactory(multiplicity='multiple')
term1 = TermFactory(taxonomy=taxonomy)
term2 = TermFactory(taxonomy=taxonomy)
assert taxonomy.is_multiple
assert not taxonomy.is_optional
item.apply_term(term1)
assert list(item.terms.all()) == [term1]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment