From 53fda44f8b3f5f236956b5d80ee4b5cc4ad22d92 Mon Sep 17 00:00:00 2001 From: Qwann Date: Sun, 2 Oct 2016 14:19:38 +0200 Subject: [PATCH] debut des tests --- event/tests.py | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/event/tests.py b/event/tests.py index 7ce503c..ceaa19c 100644 --- a/event/tests.py +++ b/event/tests.py @@ -1,3 +1,27 @@ +from django.contrib.auth.models import User from django.test import TestCase +from datetime import datetime +from django.utils import timezone +from .models import Event -# Create your tests here. + +class ActivityInheritanceTest(TestCase): + @classmethod + def setUpTestData(cls): + cls.erkan = User.objects.create( + username='enarmanli', + email='erkan.narmanli@ens.fr', + first_name='Erkan', + last_name='Narmanli', + ) + cls.event = Event.objects.create( + title='La Nuit 2042', + slug='nuit42', + created_by=cls.erkan, + creation_date=datetime.now(), + descrition="La nuit c'est lol", + beginning_date=timezone.now() + + datetime.timedelta(days=30), + ending_date=timezone.now() + + datetime.timedelta(days=31), + )