diff --git a/smash/web/tests/functions.py b/smash/web/tests/functions.py
index 617756cbd2fa6b5530da8a9afcb0b6dd82b8c6b2..01d3c9a27d80bfabbcc3ff011a934304633ef3ca 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"