Project

General

Profile

Download (583 Bytes) Statistics
| Branch: | Tag: | Revision:

calebasse / calebasse / dossiers / tests.py @ 54318d2c

1 8b82d1fa Mikaël Ates
# -*- coding: utf-8 -*-
2
from django.test import TestCase
3
from django.contrib.auth.models import User
4 5ae15fa7 Benjamin Dauvergne
5 8b82d1fa Mikaël Ates
from models import create_patient
6 586af040 Jérôme Schneider
from calebasse.dossiers.models import Status
7 bb8c46e4 Mikaël Ates
from calebasse.ressources.models import Service
8 5ae15fa7 Benjamin Dauvergne
9
10 8b82d1fa Mikaël Ates
class PatientRecordTest(TestCase):
11 5ae15fa7 Benjamin Dauvergne
12 8b82d1fa Mikaël Ates
    def test_states(self):
13
        creator = User.objects.create(username='John')
14 586af040 Jérôme Schneider
        for service in Service.objects.all():
15 8b82d1fa Mikaël Ates
            patient = create_patient('John', 'Doe', service, creator)
16 586af040 Jérôme Schneider
            for status in Status.objects.filter(services=service):
17
                patient.set_state(status, creator)