Skip to content

Commit 5a232b5

Browse files
committed
docs: update urls.rst according to code review
1 parent d6fa886 commit 5a232b5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/usage/urls.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)