Skip to content

Commit fae5f25

Browse files
committed
Update collection edit test
1 parent 293f4b4 commit fae5f25

1 file changed

Lines changed: 10 additions & 18 deletions

File tree

tests/test_collection.py

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,11 @@ def test_Collection_edit(collection, movies):
179179
newTitleSort = "New Title Sort"
180180
newContentRating = "New Content Rating"
181181
newSummary = "New Summary"
182-
collection.edit(
183-
title=newTitle,
184-
titleSort=newTitleSort,
185-
contentRating=newContentRating,
186-
summary=newSummary
187-
)
182+
collection \
183+
.editTitle(newTitle) \
184+
.editSortTitle(newTitleSort) \
185+
.editContentRating(newContentRating) \
186+
.editSummary(newSummary)
188187
collection.reload()
189188
assert collection.title == newTitle
190189
assert collection.titleSort == newTitleSort
@@ -195,18 +194,11 @@ def test_Collection_edit(collection, movies):
195194
for f in fields:
196195
assert collection.isLocked(field=f)
197196

198-
collection.edit(
199-
title=title,
200-
titleSort=titleSort,
201-
contentRating=contentRating or "",
202-
summary=summary,
203-
**{
204-
"title.locked": 0,
205-
"titleSort.locked": 0,
206-
"contentRating.locked": 0,
207-
"summary.locked": 0
208-
}
209-
)
197+
collection \
198+
.editTitle(title, locked=False) \
199+
.editSortTitle(titleSort, locked=False) \
200+
.editContentRating(contentRating or "", locked=False) \
201+
.editSummary(summary, locked=False)
210202
collection.reload()
211203
assert collection.title == title
212204
assert collection.titleSort == titleSort

0 commit comments

Comments
 (0)