Skip to content
This repository was archived by the owner on Dec 5, 2023. It is now read-only.

Commit e857b0d

Browse files
committed
set cust id in cookie
1 parent 53d05b4 commit e857b0d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

locustfile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ def addItemToCart(self):
6464
self.client.post("/cart", json={"id": self.item_id, "quantity": 1})
6565

6666
def buy(self):
67-
self.client.post("/orders", json={"customer": self.cust_id})
67+
cookie = {'logged_in': self.cust_id}
68+
self.client.post("/orders", cookies=cookie)
6869

6970
def login(self):
7071
base64string = base64.encodestring('%s:%s' % (self.username, self.password)).replace('\n', '')

0 commit comments

Comments
 (0)