Fixed #23289 -- Added mock as a test dependency.

This commit is contained in:
Tim Graham 2014-11-29 11:45:06 -05:00
parent 43fcf3505e
commit 82e4f956e3
6 changed files with 34 additions and 8 deletions

View file

@ -374,6 +374,16 @@ if __name__ == "__main__":
help='Run the Selenium tests as well (if Selenium is installed)')
options = parser.parse_args()
# mock is a required dependency
try:
from django.test import mock # NOQA
except ImportError:
print(
"Please install test dependencies first: \n"
"$ pip install -r requirements/py%s.txt" % sys.version_info.major
)
sys.exit(1)
# Allow including a trailing slash on app_labels for tab completion convenience
options.modules = [os.path.normpath(labels) for labels in options.modules]