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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user