From 3c27aa06397169da4d6c9a051ab69df631770f21 Mon Sep 17 00:00:00 2001
From: Carlos Vega <carlos.vega@uni.lu>
Date: Tue, 30 Oct 2018 11:54:19 +0100
Subject: [PATCH] added function to create general appointment

---
 smash/web/tests/functions.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/smash/web/tests/functions.py b/smash/web/tests/functions.py
index 617756cb..01d3c9a2 100644
--- a/smash/web/tests/functions.py
+++ b/smash/web/tests/functions.py
@@ -160,7 +160,7 @@ def create_appointment_type(code='C', default_duration=10, description='test'):
         default_duration=default_duration,
         description=description,
     )
-    
+
 
 def create_contact_attempt(subject=None, worker=None):
     if subject is None:
@@ -309,6 +309,14 @@ def create_appointment(visit=None, when=None, length=30):
         datetime_when=when)
 
 
+def create_appointment_without_visit(when=None, length=30):
+    return Appointment.objects.create(
+        length=length,
+        location=get_test_location(),
+        status=Appointment.APPOINTMENT_STATUS_SCHEDULED,
+        datetime_when=when)
+
+
 def create_configuration_item():
     item = ConfigurationItem.objects.create()
     item.type = "TEST"
-- 
GitLab