1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

Added accounts test(moved from admin)

Actuall added admin tests
This commit is contained in:
Real-Gecko 2020-05-29 15:47:13 +06:00 committed by catborise
parent f46a14219c
commit ad51747697
2 changed files with 1 additions and 2 deletions

View file

@ -9,7 +9,6 @@ from accounts.models import UserAttributes
class AdminTestCase(TestCase):
def setUp(self):
self.client.login(username='admin', password='admin')
def test_group_list(self):
response = self.client.get(reverse('admin:group_list'))
self.assertEqual(response.status_code, 200)

View file

@ -1,4 +1,3 @@
from django.contrib.auth.decorators import user_passes_test
from django.contrib.auth.models import Group, User
from django.core.paginator import Paginator
from django.shortcuts import get_object_or_404, redirect, render
@ -30,6 +29,7 @@ def group_create(request):
if form.is_valid():
form.save()
return redirect('admin:group_list')
return render(
request,
'admin/common/form.html',