Pylint fix from wierd git behavior

This commit is contained in:
rallytime 2016-02-22 09:24:13 -07:00
parent 4baea26c58
commit 8d928ab34a

View File

@ -383,40 +383,6 @@ class TestWebhookSaltHandler(SaltnadoTestCase):
)
@skipIf(NO_MOCK, NO_MOCK_REASON)
class TestWebhookSaltHandler(SaltnadoTestCase):
def get_app(self):
urls = [
(r'/hook(/.*)?', saltnado.WebhookSaltAPIHandler),
]
return self.build_tornado_app(urls)
@patch('salt.utils.event.get_event')
def test_hook_can_handle_get_parameters(self, get_event):
self._app.mod_opts['webhook_disable_auth'] = True
event = MagicMock()
event.fire_event.return_value = True
get_event.return_value = event
response = self.fetch('/hook/my_service/?param=1&param=2',
body=json.dumps({}),
method='POST',
headers={'Content-Type': self.content_type_map['json']})
self.assertEqual(response.code, 200, response.body)
host = urlparse(response.effective_url).netloc
event.fire_event.assert_called_once_with(
{'headers': {'Content-Length': '2',
'Connection': 'close',
'Content-Type': 'application/json',
'Host': host,
'Accept-Encoding': 'gzip'},
'post': {},
'get': {'param': ['1', '2']}
},
'salt/netapi/hook/my_service/',
)
class TestSaltAuthHandler(SaltnadoTestCase):
def get_app(self):