Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
internewshid
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
aptivate
client-projects
internewshid
Commits
15d45df6
Commit
15d45df6
authored
9 years ago
by
Martin Burchell
Browse files
Options
Downloads
Patches
Plain Diff
Enabled data_layer test for applying multiple tags
parent
6fd1a604
No related branches found
No related tags found
2 merge requests
!46
Tagging frontend
,
!45
Add multiple terms api
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
django/website/data_layer/tests/item_tests.py
+3
-4
3 additions, 4 deletions
django/website/data_layer/tests/item_tests.py
with
3 additions
and
4 deletions
django/website/data_layer/tests/item_tests.py
+
3
−
4
View file @
15d45df6
...
...
@@ -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
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment