mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-02-06 15:33:01 +00:00
17 lines
450 B
Python
17 lines
450 B
Python
|
from django.contrib.auth.models import User
|
||
|
from django.test import TestCase
|
||
|
|
||
|
|
||
|
class TestAPIPages(TestCase):
|
||
|
def setUp(self):
|
||
|
self.user = User.objects.create_superuser(
|
||
|
username="admin",
|
||
|
password="apitest",
|
||
|
email="",
|
||
|
)
|
||
|
self.client.force_login(self.user)
|
||
|
|
||
|
def test_user_page(self):
|
||
|
response = self.client.get("/api/user/")
|
||
|
self.assertEqual(response.status_code, 200)
|