diff options
author | zsloan | 2018-03-29 15:46:45 +0000 |
---|---|---|
committer | zsloan | 2018-03-29 15:46:45 +0000 |
commit | fef4b723d0e9d9d0b5f40bd51c6a2cd31410285b (patch) | |
tree | 22268c6f4db65f637070319a497de24b82843f0f /wqflask/mock | |
parent | 6ff7df2360d1a6d0461980c938809165982583e8 (diff) | |
parent | b215b5fe5c6d13f0ed445106230e1e38db71c918 (diff) | |
download | genenetwork2-fef4b723d0e9d9d0b5f40bd51c6a2cd31410285b.tar.gz |
Resolved conflict in views.py
Diffstat (limited to 'wqflask/mock')
-rw-r--r-- | wqflask/mock/__init__.py | 0 | ||||
-rw-r--r-- | wqflask/mock/es_double.py | 15 |
2 files changed, 15 insertions, 0 deletions
diff --git a/wqflask/mock/__init__.py b/wqflask/mock/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/wqflask/mock/__init__.py diff --git a/wqflask/mock/es_double.py b/wqflask/mock/es_double.py new file mode 100644 index 00000000..6ef8a1b9 --- /dev/null +++ b/wqflask/mock/es_double.py @@ -0,0 +1,15 @@ +class ESDouble(object): + def __init__(self): + self.items = {} + + def ping(self): + return true + + def create(self, index, doc_type, body, id): + self.items["index"] = {doc_type: {"id": id, "_source": data}} + + def search(self, index, doc_type, body): + return { + "hits": { + "hits": self.items[index][doc_type][body] + }} |