# Path: feedhq/es.py
# def user_alias(user_id):
# def wait_for_yellow():
# def bulk(ops, **kwargs):
# def counts(user, feed_ids, unread=True, stars=False):
# def entry(user, id, annotate_results=True):
# def mget(user, pks, annotate_results=True):
# def _annotate(results, user):
# def next_id():
# def _and_or_term(values):
# def _lookup(name, lk):
#     def __init__(self, **kwargs):
#     def _clone(self):
#     def filter(self, clone=True, or_=False, **kwargs):
#     def exclude(self, **kwargs):
#     def _apply_filters(self, negate=False, or_=False, **kwargs):
#     def defer(self, *fields):
#     def only(self, *fields):
#     def aggregate(self, name, **kwargs):
#     def query_aggregate(self, name, **kwargs):
#     def order_by(self, *criteria):
#     def fetch(self, page=1, per_page=50, annotate=None):
#     def user(self, user_or_id):
# def ignore_bulk_error(*statuses):
# class EntryQuery(object):
# class EntryManager(object):


from django.conf import settings
from django.core.management import call_command
from django.test.runner import DiscoverRunner
from elasticsearch.exceptions import NotFoundError
from feedhq import es



class ESTestSuiteRunner(DiscoverRunner):
    def setup_test_environment(self):
        super().setup_test_environment()
        try:

# Path: feedhq/es.py
# def user_alias(user_id):
# def wait_for_yellow():
# def bulk(ops, **kwargs):
# def counts(user, feed_ids, unread=True, stars=False):
# def entry(user, id, annotate_results=True):
# def mget(user, pks, annotate_results=True):
# def _annotate(results, user):
# def next_id():
# def _and_or_term(values):
# def _lookup(name, lk):
#     def __init__(self, **kwargs):
#     def _clone(self):
#     def filter(self, clone=True, or_=False, **kwargs):
#     def exclude(self, **kwargs):
#     def _apply_filters(self, negate=False, or_=False, **kwargs):
#     def defer(self, *fields):
#     def only(self, *fields):
#     def aggregate(self, name, **kwargs):
#     def query_aggregate(self, name, **kwargs):
#     def order_by(self, *criteria):
#     def fetch(self, page=1, per_page=50, annotate=None):
#     def user(self, user_or_id):
# def ignore_bulk_error(*statuses):
# class EntryQuery(object):
# class EntryManager(object):


# Path: tests/runner.py
from django.conf import settings
from django.core.management import call_command
from django.test.runner import DiscoverRunner
from elasticsearch.exceptions import NotFoundError
from feedhq import es




class ESTestSuiteRunner(DiscoverRunner):
    def setup_test_environment(self):
        super().setup_test_environment()
        try:

            es.client.indices.delete(settings.ES_INDEX)