When running tests, check app.tests.testcase if app.models.testcase is junk #18670

See https://code.djangoproject.com/ticket/18670