1
0
mirror of https://gitlab.crans.org/mediatek/med.git synced 2025-06-29 17:51:10 +02:00

More testing

This commit is contained in:
Alexandre Iooss
2019-08-16 19:44:27 +02:00
parent 62faa241d2
commit c2ab1e4bc5
12 changed files with 159 additions and 33 deletions

0
logs/tests/__init__.py Normal file
View File

View File

@ -0,0 +1,29 @@
# -*- mode: python; coding: utf-8 -*-
# SPDX-License-Identifier: GPL-3.0-or-later
from django.test import TestCase
from django.urls import reverse
from users.models import User
"""
Test that every page render
"""
class TemplateTests(TestCase):
def setUp(self):
self.user = User.objects.create_superuser(
username="admin",
password="adminadmin",
email="admin@example.com",
)
self.client.force_login(self.user)
def test_logs_index(self):
response = self.client.get(reverse("logs:index"))
self.assertEqual(response.status_code, 200)
def test_logs_stats_actions(self):
response = self.client.get(reverse("logs:stats-actions"))
self.assertEqual(response.status_code, 200)