Skip to content
Snippets Groups Projects
Commit 24ff6af3 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

common unit test initialization extracted

parent 0dbdadcc
No related branches found
No related tags found
1 merge request!111Resolve "Unfinished appointments"
......@@ -3,28 +3,20 @@
import datetime
import json
from django.contrib.auth.models import User
from django.test import Client
from django.test import TestCase
from django.urls import reverse
from web.models import AppointmentTypeLink, AppointmentList
from web.tests.functions import create_study_subject, create_worker, create_visit, create_appointment, \
from web.tests import LoggedInWithWorkerTestCase
from web.tests.functions import create_study_subject, create_visit, create_appointment, \
create_appointment_type, create_get_suffix, create_flying_team
from web.views.appointment import APPOINTMENT_LIST_GENERIC, APPOINTMENT_LIST_APPROACHING, APPOINTMENT_LIST_UNFINISHED
from web.views.notifications import get_today_midnight_date
class TestAppointmentApi(TestCase):
class TestAppointmentApi(LoggedInWithWorkerTestCase):
def setUp(self):
super(TestAppointmentApi, self).setUp()
self.study_subject = create_study_subject()
self.client = Client()
username = 'piotr'
password = 'top_secret'
self.user = User.objects.create_user(
username=username, email='jacob@bla', password=password)
self.worker = create_worker(self.user)
self.client.login(username=username, password=password)
def test_appointments_valid(self):
place = "Some new flying team location"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment