Merge pull request #11388 from edx/benp/more-testsonly-support
Do not flush the database when using bok-choy in testsonly mode.
This commit is contained in:
@@ -100,12 +100,16 @@ class BokChoyTestSuite(TestSuite):
|
||||
def __exit__(self, exc_type, exc_value, traceback):
|
||||
super(BokChoyTestSuite, self).__exit__(exc_type, exc_value, traceback)
|
||||
|
||||
msg = colorize('green', "Cleaning up databases...")
|
||||
print msg
|
||||
|
||||
# Clean up data we created in the databases
|
||||
sh("./manage.py lms --settings bok_choy flush --traceback --noinput")
|
||||
bokchoy_utils.clear_mongo()
|
||||
# Using testsonly will leave all fixtures in place (Note: the db will also be dirtier.)
|
||||
if self.testsonly:
|
||||
msg = colorize('green', 'Running in testsonly mode... SKIPPING database cleanup.')
|
||||
print msg
|
||||
else:
|
||||
# Clean up data we created in the databases
|
||||
msg = colorize('green', "Cleaning up databases...")
|
||||
print msg
|
||||
sh("./manage.py lms --settings bok_choy flush --traceback --noinput")
|
||||
bokchoy_utils.clear_mongo()
|
||||
|
||||
def verbosity_processes_string(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user