Models #8

Merged
narmanli merged 21 commits from models into master 2017-03-05 13:26:42 +01:00
Showing only changes of commit 53fda44f8b - Show all commits

View file

@ -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),
)