From 46b985e22288e7a43b9205437c0cb2526c6217dc Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 22 Jul 2020 18:40:27 +0200 Subject: [PATCH] bugfix: defined owner_id in fixture tag_id --- tests/conftest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index bd6209ed..0f4240ef 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -125,7 +125,8 @@ def file(name: str) -> dict: def tag_id(app: Devicehub) -> str: """Creates a tag and returns its id.""" with app.app_context(): - t = Tag(id='foo') + user = User.query.one() + t = Tag(id='foo', owner_id=user.id) db.session.add(t) db.session.commit() return t.id