本文整理匯總了Python中bzt.modules.blazemeter.BlazeMeterUploader.parameters['signature']方法的典型用法代碼示例。如果您正苦於以下問題:Python BlazeMeterUploader.parameters['signature']方法的具體用法?Python BlazeMeterUploader.parameters['signature']怎麽用?Python BlazeMeterUploader.parameters['signature']使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類bzt.modules.blazemeter.BlazeMeterUploader
的用法示例。
在下文中一共展示了BlazeMeterUploader.parameters['signature']方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_direct_feeding
# 需要導入模塊: from bzt.modules.blazemeter import BlazeMeterUploader [as 別名]
# 或者: from bzt.modules.blazemeter.BlazeMeterUploader import parameters['signature'] [as 別名]
def test_direct_feeding(self):
obj = BlazeMeterUploader()
self.sniff_log(obj.log)
obj.engine = EngineEmul()
mock = BZMock(obj._user)
mock.mock_post.update({
'https://data.blazemeter.com/submit.php?session_id=direct&signature=sign&test_id=None&user_id=None&pq=0&target=labels_bulk&update=1': {},
'https://data.blazemeter.com/api/v4/image/direct/files?signature=sign': {"result": True},
'https://a.blazemeter.com/api/v4/sessions/direct/stop': {"result": True},
'https://data.blazemeter.com/submit.php?session_id=direct&signature=sign&test_id=None&user_id=None&pq=0&target=engine_health&update=1': {
'result': {'session': {}}}
})
mock.mock_get.update({
'https://a.blazemeter.com/api/v4/sessions/direct': {"result": {}}
})
mock.mock_patch.update({
'https://a.blazemeter.com/api/v4/sessions/direct': {"result": {}}
})
obj.parameters['session-id'] = 'direct'
obj.parameters['signature'] = 'sign'
obj.settings['token'] = 'FakeToken'
obj.prepare()
obj.startup()
obj.check()
obj.shutdown()
obj.engine.stopping_reason = TaurusException("To cover")
obj.post_process()
self.assertNotIn("Failed to finish online", self.log_recorder.warn_buff.getvalue())
self.assertEquals('direct', obj._session['id'])
self.assertEqual(9, len(mock.requests), "Requests were: %s" % mock.requests)