1👍
This might do the job:
from django.test import Client
c = Client()
logged_in = c.login(username='testuser', password='12345')
Source:stackexchange.com
1👍
This might do the job:
from django.test import Client
c = Client()
logged_in = c.login(username='testuser', password='12345')