diff --git a/conftest.py b/conftest.py
index <HASH>..<HASH> 100644
--- a/conftest.py
+++ b/conftest.py
@@ -1,11 +1,18 @@
 # -*- coding:utf-8 -*-
 from __future__ import unicode_literals
 
+import django
 from django.db import connection
 
 
 def pytest_report_header(config):
-    with connection.cursor() as cursor:
-        cursor.execute("SELECT VERSION()")
-        version = cursor.fetchone()[0]
-    return "MySQL version: {}".format(version)
+    dot_version = '.'.join(str(x) for x in django.VERSION)
+    header = "Django version: " + dot_version
+
+    if hasattr(connection, '_nodb_connection'):
+        with connection._nodb_connection.cursor() as cursor:
+            cursor.execute("SELECT VERSION()")
+            version = cursor.fetchone()[0]
+        header += "\nMySQL version: {}".format(version)
+
+    return header
Fix pytest version report when database does not exist, add Django version header