diff --git a/beat/web/common/testutils.py b/beat/web/common/testutils.py
index 5b9553691fc606bf36c1326a69b3655c1942cac5..c44f68a4cbcf135c1a2755f6c2a0afaf98a4328d 100644
--- a/beat/web/common/testutils.py
+++ b/beat/web/common/testutils.py
@@ -31,7 +31,10 @@ import shutil
 from django.test import TestCase
 from django.conf import settings
 
-from urlparse import urlparse
+try:
+    from urlparse import urlparse
+except ImportError:
+    from urllib.parse import urlparse
 
 import simplejson as json