Add error handling if testscenarios aren't supported

If the test runner doesn't support the load_tests mechanism it's
better to raise an proper exception.

Change-Id: I3f5d4b2bc285874bbeabf8ddefec6c28fd2b9c91
Closes-Bug: #1293433
This commit is contained in:
Marc Koderer
2014-03-20 08:24:38 +01:00
parent 8b93bb40c2
commit febc4eee83

View File

@@ -510,6 +510,10 @@ class NegativeAutoTest(BaseTestCase):
new_url, body = self._http_arguments(valid_schema, url, method)
elif hasattr(self, "schema"):
new_url, body = self._http_arguments(self.schema, url, method)
else:
raise Exception("testscenarios are not active. Please make sure "
"that your test runner supports the load_tests "
"mechanism")
if "admin_client" in description and description["admin_client"]:
client = self.admin_client