def test_patch(self): flow = tutils.tflow(req=req_patch) result = ' ' + """ @task() def path(self): url = self.locust.host + '/path' headers = { 'header': 'qvalue', 'content-length': '7', } params = { 'query': 'param', } data = '''content''' self.response = self.client.request( method='PATCH', url=url, headers=headers, params=params, data=data, ) """.strip() + '\n' assert flow_export.locust_task(flow) == result
def test_post(self): flow = tutils.tflow(req=req_post) result = ' ' + """ @task() def path(self): url = self.locust.host + '/path' data = '''content''' self.response = self.client.request( method='POST', url=url, data=data, ) """.strip() + '\n' assert flow_export.locust_task(flow) == result
def test_get(self): flow = tutils.tflow(req=req_get) result = ' ' + """ @task() def path(self): url = self.locust.host + '/path' headers = { 'header': 'qvalue', 'content-length': '7', } self.response = self.client.request( method='GET', url=url, headers=headers, ) """.strip() + '\n' assert flow_export.locust_task(flow) == result
def test_patch(self): flow = tutils.tflow(req=req_patch()) python_equals("test_flow_export/locust_task_patch.py", flow_export.locust_task(flow))
def test_get(self): flow = tutils.tflow(req=req_get()) python_equals("test_flow_export/locust_task_get.py", flow_export.locust_task(flow))