Skip to content

Commit 3aa20af

Browse files
author
Agus Makmun
committed
fix: unitest AttributeError: 'Client' object has no attribute 'force_login'
1 parent 7d27795 commit 3aa20af

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

martor/tests/tests.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from django.test import TestCase, override_settings
1+
from django.test import TestCase, Client, override_settings
22
from django.contrib.auth.models import User
33
from martor.utils import markdownify, VersionNotCompatible
44

@@ -10,8 +10,7 @@ def setUp(self):
1010
1111
password="TestEgg@1234",
1212
)
13-
self.user.is_active = True
14-
self.user.save()
13+
self.client = Client()
1514
self.client.force_login(self.user)
1615

1716
def test_form(self):

0 commit comments

Comments
 (0)