Skip to content

Commit

Permalink
variable rename
Browse files Browse the repository at this point in the history
  • Loading branch information
NiallEgan committed Jul 20, 2018
1 parent 6e1546e commit 822aa97
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test_utils/test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ class DjangoAutoTestSuite(unittest.TestSuite):
"""

def __init__(self, *args, **kwargs):
print('Name: ' + __name__)
self._configure()
self.test_runner = DiscoverRunner()
tests = self.test_runner.build_suite()
super(DjangoAutoTestSuite, self).__init__(tests=tests, *args, **kwargs)
self.test_runner.setup_test_environment()

self.old_config = self.test_runner.setup_databases()
self.test_dbs = self.test_runner.setup_databases()

def _configure(self):
test_settings = importlib.import_module('test_settings')
Expand All @@ -36,7 +35,7 @@ def _configure(self):

def run(self, result_obj, *args, **kwargs):
result = super(DjangoAutoTestSuite, self).run(result_obj, *args, **kwargs)
self.test_runner.teardown_databases(self.old_config)
self.test_runner.teardown_databases(self.test_dbs)
self.test_runner.teardown_test_environment()

return result
Expand Down

0 comments on commit 822aa97

Please sign in to comment.