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:
parent
f46a14219c
commit
ad51747697
2 changed files with 1 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue