Skip to content

Commit 9cbca31

Browse files
committed
✅ (tests/util) Raise for no entity ID
1 parent 669b453 commit 9cbca31

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/test_util.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import pytest
12
from followthemoney import model
23

34
from openaleph_procrastinate import util
@@ -34,5 +35,7 @@ def test_util():
3435

3536
for i in ("", None):
3637
e.id = i
37-
assert util.make_stub_entity(e) is None
38-
assert util.make_file_entity(e) is None
38+
with pytest.raises(RuntimeError):
39+
util.make_stub_entity(e)
40+
with pytest.raises(RuntimeError):
41+
util.make_file_entity(e)

0 commit comments

Comments
 (0)