diff --git a/elasticmock/fake_elasticsearch.py b/elasticmock/fake_elasticsearch.py
index <HASH>..<HASH> 100644
--- a/elasticmock/fake_elasticsearch.py
+++ b/elasticmock/fake_elasticsearch.py
@@ -1,6 +1,7 @@
 # -*- coding: utf-8 -*-
 
 import json
+import sys
 
 from elasticsearch import Elasticsearch
 from elasticsearch.client.utils import query_params
@@ -9,6 +10,11 @@ from elasticsearch.exceptions import NotFoundError
 from elasticmock.utilities import get_random_id
 
 
+PY3 = sys.version_info[0] == 3
+if PY3:
+    unicode = str
+
+
 class FakeElasticsearch(Elasticsearch):
     __documents_dict = None
Make FakeElasticsearch work with modern python 3

As unicode() is not there anymore