ft_transcendence/srcs/accounts/tests/logout.py

18 lines
476 B
Python
Raw Permalink Normal View History

2023-11-23 10:43:30 -05:00
from django.test import TestCase
from django.test.client import Client
from django.contrib.auth.models import User
from django.contrib.auth import login
class LoginTest(TestCase):
def setUp(self):
self.client = Client()
self.url = "/accounts/logout"
self.client.login()
def test_normal_logout(self):
response: HttpResponse = self.client.post(self.url)
self.assertNotIn('_auth_user_id', self.client.session)