1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-07-04 01:32:08 +02:00

Fully test logs app

This commit is contained in:
Yohann D'ANELLO
2020-09-24 14:30:24 +02:00
parent 1979d33314
commit a2ce495a6b
4 changed files with 34 additions and 7 deletions

View File

@ -1,3 +1,6 @@
from unittest.case import skipIf
from django.conf import settings
from django.contrib.auth.models import User
from django.test import TestCase
@ -14,3 +17,8 @@ class TestAPIPages(TestCase):
def test_user_page(self):
response = self.client.get("/api/user/")
self.assertEqual(response.status_code, 200)
@skipIf("logs" not in settings.INSTALLED_APPS, reason="logs app is not used")
def test_logs_page(self):
response = self.client.get("/api/logs/")
self.assertEqual(response.status_code, 200)