1
|
# -*- coding: utf-8 -*-
|
2
|
from django.test import TestCase
|
3
|
from django.contrib.auth.models import User
|
4
|
|
5
|
from models import create_patient
|
6
|
from calebasse.dossiers.models import Status
|
7
|
from calebasse.ressources.models import Service
|
8
|
|
9
|
|
10
|
class PatientRecordTest(TestCase):
|
11
|
|
12
|
def test_states(self):
|
13
|
creator = User.objects.create(username='John')
|
14
|
for service in Service.objects.all():
|
15
|
patient = create_patient('John', 'Doe', service, creator)
|
16
|
for status in Status.objects.filter(services=service):
|
17
|
patient.set_state(status, creator)
|