Fix tests…

…due to merge of aureplop/kfet-auth
This commit is contained in:
Aurélien Delobelle 2017-10-24 19:43:12 +02:00
parent c524da22fe
commit aa405d212a
2 changed files with 2 additions and 2 deletions

View file

@ -14,7 +14,6 @@ from kfet.models import Account
from . import KFET_GENERIC_TRIGRAMME, KFET_GENERIC_USERNAME from . import KFET_GENERIC_TRIGRAMME, KFET_GENERIC_USERNAME
from .backends import AccountBackend, GenericBackend from .backends import AccountBackend, GenericBackend
from .fields import GroupsField, CorePermissionsField from .fields import GroupsField, CorePermissionsField
from .forms import UserGroupForm
from .middleware import TemporaryAuthMiddleware from .middleware import TemporaryAuthMiddleware
from .models import GenericTeamToken, Group, Permission from .models import GenericTeamToken, Group, Permission
from .utils import get_kfet_generic_user from .utils import get_kfet_generic_user
@ -141,6 +140,7 @@ class UserGroupFormTests(TestCase):
User stays in its non-K-Fêt groups. User stays in its non-K-Fêt groups.
Regression test for #161. Regression test for #161.
""" """
from .forms import UserGroupForm
# add user to a non-K-Fêt group # add user to a non-K-Fêt group
self.user.groups.add(self.ot_group) self.user.groups.add(self.ot_group)

View file

@ -463,7 +463,7 @@ class AccountGroupUpdateViewTests(ViewTestCaseMixin, TestCase):
def test_post_ok(self): def test_post_ok(self):
r = self.client.post(self.url, self.post_data) r = self.client.post(self.url, self.post_data)
self.assertRedirects(r, reverse('kfet.account.group')) self.assertRedirects(r, reverse('kfet.group'))
self.group.refresh_from_db() self.group.refresh_from_db()