Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor search tests #6197

Merged
merged 5 commits into from
Aug 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions tests/test_search/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals

from tests.base import OsfTestCase
from tests.test_features import requires_search
from website import settings
from website.search import elastic_search
import website.search.search as search


TEST_INDEX = 'test'


@requires_search
class SearchTestCase(OsfTestCase):

def tearDown(self):
super(SearchTestCase, self).tearDown()
search.delete_index(elastic_search.INDEX)
search.create_index(elastic_search.INDEX)
def setUp(self):
super(SearchTestCase, self).setUp()
elastic_search.INDEX = TEST_INDEX
settings.ELASTIC_INDEX = TEST_INDEX
search.delete_index(elastic_search.INDEX)
search.create_index(elastic_search.INDEX)
Loading