File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,11 @@ Following is example of integration of pyodata as url provider for Locust_ load
2525
2626 import requests
2727 import pyodata
28+ import os
2829 from locust import HttpUser, task, between
30+
2931 SERVICE_URL = ' http://services.odata.org/V2/Northwind/Northwind.svc/'
30-
32+
3133 odataClient = pyodata.Client(SERVICE_URL , requests.Session())
3234 smith_employees_query = odataClient.entity_sets.Employees.get_entities().filter(" FirstName eq 'John' and LastName eq 'Smith'" )
3335
@@ -38,6 +40,6 @@ Following is example of integration of pyodata as url provider for Locust_ load
3840 @task (1 )
3941 def filter_query (self ):
4042 urlpath = smith_employees_query.get_path()
41- url = SERVICE_URL + urlpath
43+ url = os.path.join( SERVICE_URL , urlpath)
4244 params = smith_employees_query.get_query_params()
4345 self .client.get(url,params = params)
You can’t perform that action at this time.
0 commit comments