mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #37213 from cachedout/more_salttesting_fixes
More salttesting fixes
This commit is contained in:
commit
6aaf6bf399
@ -87,12 +87,18 @@ class SaltnadoTestCase(integration.ModuleCase, AsyncHTTPTestCase):
|
||||
return self.auth.mk_token(self.auth_creds_dict)
|
||||
|
||||
def setUp(self):
|
||||
super(SaltnadoTestCase, self).setUp()
|
||||
try:
|
||||
super(SaltnadoTestCase, self).setUp()
|
||||
except NotImplementedError:
|
||||
pass
|
||||
self.async_timeout_prev = os.environ.pop('ASYNC_TEST_TIMEOUT', None)
|
||||
os.environ['ASYNC_TEST_TIMEOUT'] = str(30)
|
||||
|
||||
def tearDown(self):
|
||||
super(SaltnadoTestCase, self).tearDown()
|
||||
try:
|
||||
super(SaltnadoTestCase, self).tearDown()
|
||||
except AttributeError:
|
||||
pass
|
||||
if self.async_timeout_prev is None:
|
||||
os.environ.pop('ASYNC_TEST_TIMEOUT', None)
|
||||
else:
|
||||
|
@ -73,6 +73,14 @@ class BaseTCPReqCase(TestCase):
|
||||
cls.server_channel.close()
|
||||
del cls.server_channel
|
||||
|
||||
@classmethod
|
||||
@tornado.gen.coroutine
|
||||
def _handle_payload(cls, payload):
|
||||
'''
|
||||
TODO: something besides echo
|
||||
'''
|
||||
raise tornado.gen.Return((payload, {'fun': 'send_clear'}))
|
||||
|
||||
|
||||
@skipIf(salt.utils.is_darwin(), 'hanging test suite on MacOS')
|
||||
class ClearReqTestCases(BaseTCPReqCase, ReqChannelMixin):
|
||||
|
@ -111,6 +111,8 @@ if HAS_CHERRYPY:
|
||||
}
|
||||
|
||||
def setUp(self):
|
||||
if not hasattr(self, '_cp_config'):
|
||||
self._cp_config = {}
|
||||
Root._cp_config = self._cp_config
|
||||
root = Root()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user