Skip to content

Commit 094bfce

Browse files
committed
Pytest collection explicit collection name
1 parent eb68b64 commit 094bfce

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tests/conftest.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,13 +234,11 @@ def movie(movies):
234234
@pytest.fixture()
235235
def collection(movies):
236236
try:
237-
return movies.collections()[0]
237+
return movies.collections(title="marvel")[0]
238238
except IndexError:
239239
movie = movies.get("Elephants Dream")
240-
movie.addCollection(["marvel"])
241-
242-
n = movies.reload()
243-
return n.collections()[0]
240+
movie.addCollection("marvel")
241+
return movies.collections(title="marvel")[0]
244242

245243

246244
@pytest.fixture()

0 commit comments

Comments
 (0)