gestioCOF/kfet/tests.py

148 lines
3.5 KiB
Python
Raw Normal View History

2016-09-01 00:45:44 +02:00
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division,
print_function, unicode_literals)
from builtins import *
2016-08-02 10:40:46 +02:00
from django.test import TestCase
from kfet.models import Account
from gestioncof.models import CofProfile, User
names = ['Abelardus',
'Abrahamus',
'Acacius',
'Accius',
'Achaicus',
'Achill',
'Achilles',
'Achilleus',
'Acrisius',
'Actaeon',
'Acteon',
'Adalricus',
'Adelfonsus',
'Adelphus',
'Adeodatus',
'Adolfus',
'Adolphus',
'Adrastus',
'Adrianus',
'Ægidius',
'Ælia',
'Ælianus',
'Æmilianus',
'Æmilius',
'Aeneas',
'Æolus',
'Æschylus',
'Æson',
'Æsop',
'Æther',
'Ætius',
'Agapetus',
'Agapitus',
'Agapius',
'Agathangelus',
'Aigidius',
'Aiolus',
'Ajax',
'Alair',
'Alaricus',
'Albanus',
'Alberic',
'Albericus',
'Albertus',
'Albinus',
'Albus',
'Alcaeus',
'Alcander',
'Alcimus',
'Alcinder',
'Alerio',
'Alexandrus',
'Alexis',
'Alexius',
'Alexus',
'Alfonsus',
'Alfredus',
'Almericus',
'Aloisius',
'Aloysius',
'Alphaeus',
'Alpheaus',
'Alpheus',
'Alphoeus',
'Alphonsus',
'Alphonzus',
'Alvinius',
'Alvredus',
'Amadeus',
'Amaliricus',
'Amandus',
'Amantius',
'Amarandus',
'Amaranthus',
'Amatus',
'Ambrosianus',
'Ambrosius',
'Amedeus',
'Americus',
'Amlethus',
'Amletus',
'Amor',
'Ampelius',
'Amphion',
'Anacletus',
'Anastasius',
'Anastatius',
'Anastius',
'Anatolius',
'Androcles',
'Andronicus',
'Anencletus',
'Angelicus',
'Angelus',
'Anicetus',
'Antigonus',
'Antipater',
'Antoninus',
'Antonius',
'Aphrodisius',
'Apollinaris']
# Ne pas supprimer, peut être utile pour regénérer
# d'autres fixtures à l'avenir
class TestFoo(TestCase):
fixtures = ['users', 'sites', 'gestion', 'articles']
def test_foo(self):
pass
# for name in names:
# user = User(username=name,
# last_name='Romain',
# first_name=name)
# user.email = '{}.{}@ens.fr'.format(user.first_name, user.last_name)
# user.save()
# galois_trigrammes = map('{:03d}'.format, range(40))
# galois = CofProfile.objects.filter(user__last_name='Gaulois')
# romains_trigrammes = map(lambda x: str(100+x), range(40))
# romains = CofProfile.objects.filter(user__last_name='Romain')
# for t, c in zip(galois_trigrammes, galois):
# Account.objects.create(cofprofile=c, trigramme=t)
# for t, c in zip(romains_trigrammes, romains):
# Account.objects.create(cofprofile=c, trigramme=t)
# class TestBar(TestCase):
# fixtures = ['users', 'sites', 'gestion', 'articles', 'groups', 'accounts']
# def test_foo(self):
# pass