diff --git a/avisstage/tests.py b/avisstage/tests.py index 4f91494..ed8721a 100644 --- a/avisstage/tests.py +++ b/avisstage/tests.py @@ -1,5 +1,6 @@ from allauth.socialaccount.models import SocialAccount from allauth_cas.test.testcases import CASTestCase +from allauth_ens.adapter import deprecate_clippers from datetime import date @@ -307,7 +308,18 @@ class ArchicubeViewsTest(ExperiENSTestCase): # TODO : test post() +class DeprecatedArchicubeViewsTest(ArchicubeViewsTest): + def setUp(self): + super().setUp() + + self.sa_archi = SocialAccount(user=self.u_archi, + provider="clipper", + uid="archicube") + self.sa_archi.save() + deprecate_clippers() + + self.client.login(username='archicube', password='archicube') @@ -373,6 +385,8 @@ class ScolariteViewsTest(ExperiENSTestCase): kwargs={'username': self.u_conscrit.username}) r = self.client.get(testurl) self.assertEqual(r.status_code, 200) + self.assertContains(r, "Wingardium Leviosa") # Public + self.assertNotContains(r, "Avada Kedavra") # Brouillon testurl = reverse('avisstage:profil', kwargs={'username': self.u_archi.username}) diff --git a/avisstage/views.py b/avisstage/views.py index e939e19..a808831 100644 --- a/avisstage/views.py +++ b/avisstage/views.py @@ -140,7 +140,7 @@ def manage_stage(request, pk=None): avis_stage_form.instance.stage = stage avis_stage_form.save() avis_lieu_formset.save() - print(request.POST) + #print(request.POST) if "continuer" in request.POST: if pk is None: return redirect(reverse('avisstage:stage_edit',kwargs={'pk':stage.id})) @@ -168,7 +168,7 @@ def save_lieu(request): if request.method == "POST": pk = request.POST.get("id", None) - print(request.POST) + #print(request.POST) jitter = False if pk is None or pk == '': lieu = Lieu() diff --git a/avisstage/views_search.py b/avisstage/views_search.py index 9176bff..2690be6 100644 --- a/avisstage/views_search.py +++ b/avisstage/views_search.py @@ -176,7 +176,6 @@ def recherche_resultats(request): tri = cached["tri"] logger.info("recherche en cache") - print(stageids) # Pagination paginator = Paginator(stageids, 25) try: