Skip to content

Commit 6b83efe

Browse files
committed
adjust tests
1 parent 1165c58 commit 6b83efe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/units/test_model.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class ChildModel(Model):
5050

5151

5252
def test_default_primary_key(model_default_primary: Model):
53-
"""Test that if a primary key is not defined a default is added.
53+
"""Test that if no primary key is defined, an "id" field is added.
5454
5555
Args:
5656
model_default_primary: Fixture.
@@ -59,12 +59,12 @@ def test_default_primary_key(model_default_primary: Model):
5959

6060

6161
def test_custom_primary_key(model_custom_primary: Model):
62-
"""Test that if a primary key is defined no default key is added.
62+
"""Test that if a primary key is defined it is not overridden.
6363
6464
Args:
6565
model_custom_primary: Fixture.
6666
"""
67-
assert "id" not in type(model_custom_primary).model_fields
67+
assert "id" in type(model_custom_primary).model_fields
6868

6969

7070
@pytest.mark.filterwarnings(

0 commit comments

Comments
 (0)