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

Commit

Permalink
set cust id in cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
idcrosby committed Aug 25, 2016
1 parent 53d05b4 commit e857b0d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion locustfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ def addItemToCart(self):
self.client.post("/cart", json={"id": self.item_id, "quantity": 1})

def buy(self):
self.client.post("/orders", json={"customer": self.cust_id})
cookie = {'logged_in': self.cust_id}
self.client.post("/orders", cookies=cookie)

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

0 comments on commit e857b0d

Please sign in to comment.