2016-10-02 14:19:38 +02:00
|
|
|
from django.contrib.auth.models import User
|
2016-09-30 20:10:35 +02:00
|
|
|
from django.test import TestCase
|
2016-10-02 14:19:38 +02:00
|
|
|
from datetime import datetime
|
|
|
|
from django.utils import timezone
|
|
|
|
from .models import Event
|
2016-09-30 20:10:35 +02:00
|
|
|
|
2016-10-02 14:19:38 +02:00
|
|
|
|
|
|
|
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),
|
|
|
|
)
|