[WEI] Fix some tests, without considering WEI algorithm

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
Yohann D'ANELLO 2021-08-27 13:15:28 +02:00
parent 199f4ca1f2
commit 0887e4bbde
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 4 additions and 0 deletions

View File

@ -188,7 +188,9 @@ class TestWEIRegistration(TestCase):
response = self.client.post(reverse("wei:add_bus", kwargs=dict(pk=self.wei.pk)), dict( response = self.client.post(reverse("wei:add_bus", kwargs=dict(pk=self.wei.pk)), dict(
wei=self.wei.id, wei=self.wei.id,
name="Create Bus Test", name="Create Bus Test",
size=50,
description="This bus was created.", description="This bus was created.",
information_json="{}",
)) ))
qs = Bus.objects.filter(name="Create Bus Test") qs = Bus.objects.filter(name="Create Bus Test")
self.assertTrue(qs.exists()) self.assertTrue(qs.exists())
@ -218,7 +220,9 @@ class TestWEIRegistration(TestCase):
response = self.client.post(reverse("wei:update_bus", kwargs=dict(pk=self.bus.pk)), dict( response = self.client.post(reverse("wei:update_bus", kwargs=dict(pk=self.bus.pk)), dict(
name="Update Bus Test", name="Update Bus Test",
size=40,
description="This bus was updated.", description="This bus was updated.",
information_json="{}",
)) ))
qs = Bus.objects.filter(name="Update Bus Test", id=self.bus.id) qs = Bus.objects.filter(name="Update Bus Test", id=self.bus.id)
self.assertRedirects(response, reverse("wei:manage_bus", kwargs=dict(pk=self.bus.pk)), 302, 200) self.assertRedirects(response, reverse("wei:manage_bus", kwargs=dict(pk=self.bus.pk)), 302, 200)