-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from HBS-HBX/#30_multiprocessing_tests
closes #30 multiprocessing tests
- Loading branch information
Showing
24 changed files
with
221 additions
and
107 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
from django.test import TestCase | ||
|
||
from django_elastic_migrations import DEMIndexManager | ||
|
||
|
||
class DEMTestCase(TestCase): | ||
class DEMTestCaseMixin(object): | ||
""" | ||
Mix into TestCase or TransactionTestCase to set up and then later clear out | ||
temporary elasticsearch indexes for each test | ||
""" | ||
|
||
def setUp(self): | ||
DEMIndexManager.test_pre_setup() | ||
super(DEMTestCase, self)._pre_setup() | ||
super(DEMTestCaseMixin, self).setUp() | ||
DEMIndexManager.test_post_setup() | ||
|
||
def tearDown(self): | ||
DEMIndexManager.test_pre_teardown() | ||
super(DEMTestCaseMixin, self).tearDown() | ||
|
||
@classmethod | ||
def tearDownClass(cls): | ||
DEMIndexManager.test_post_teardown() | ||
super(DEMTestCase, self).tearDown() | ||
super().tearDownClass() |
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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
# Additional requirements for development of this application | ||
|
||
edx-lint # includes pylint, pylint-django, etc; configured use pylintrc | ||
psycopg2 # for postgres | ||
diff-cover # Changeset diff test coverage | ||
pip-tools # Requirements file management | ||
tox # virtualenv management for tests | ||
tox-battery # Makes tox aware of requirements file changes | ||
tox-pyenv # be able to run multiple pyenv versions with tox | ||
twine # uploading new versions to pypi | ||
wheel # For generation of wheels for PyPI |
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# Requirements for running tests in Travis | ||
|
||
codecov # Code coverage reporting | ||
psycopg2 # for postgres | ||
tox # Virtualenv management for tests | ||
tox-battery # Makes tox aware of requirements file 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
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
Oops, something went wrong.