Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test refactor - merge all the tests into one test suite (closes #951)
Major refactor by @honzakral which stabilized the test suite, makes it easier to run and add new tests and somewhat faster, too. * Merged all the tests * Mark tests as skipped when a backend is not available (e.g. no ElasticSearch or Solr connection) * Massively simplified test runner (``python setup.py test``) Minor updates: * Travis: - Test Python 3.4 - Use Solr 4.6.1 * Simplified legacy test code which can now be replaced by the test utilities in newer versions of Django * Update ElasticSearch client & tests for ES 1.0+ * Add option for SearchModelAdmin to specify the haystack connection to use * Fixed a bug with RelatedSearchQuerySet caching using multiple instances (429d234)
- Loading branch information
Showing
114 changed files
with
1,093 additions
and
1,126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import os | ||
test_runner = None | ||
old_config = None | ||
|
||
os.environ['DJANGO_SETTINGS_MODULE'] = 'test_haystack.settings' | ||
|
||
|
||
def setup(): | ||
global test_runner | ||
global old_config | ||
from django.test.simple import DjangoTestSuiteRunner | ||
test_runner = DjangoTestSuiteRunner() | ||
test_runner.setup_test_environment() | ||
old_config = test_runner.setup_databases() | ||
|
||
|
||
def teardown(): | ||
test_runner.teardown_databases(old_config) | ||
test_runner.teardown_test_environment() | ||
|
||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
tests/discovery/search_indexes.py → test_haystack/discovery/search_indexes.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.