Skip to content

Commit 0af412c

Browse files
committed
fix test - patching is_active
1 parent 699a01f commit 0af412c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/apps/user/commands/test_create.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ def tearDown(self):
3535
"piccolo.apps.user.commands.create.get_is_superuser",
3636
return_value=True,
3737
)
38+
@patch(
39+
"piccolo.apps.user.commands.create.get_is_active", return_value=True,
40+
)
3841
def test_create(self, *args, **kwargs):
3942
create()
4043

@@ -45,6 +48,7 @@ def test_create(self, *args, **kwargs):
4548
& (BaseUser.username == "bob123")
4649
& (BaseUser.email == "bob@test.com")
4750
& (BaseUser.superuser == True)
51+
& (BaseUser.active == True)
4852
)
4953
.run_sync()
5054
)

0 commit comments

Comments
 (0)