0

I assumed that it means that the page that you are redirected to after the purchase (index or whatever) would have to show the purchase. When using it myself it does.

It would be nice to figure out what the check50 program is trying to do and check for more specifically.

Does anyone know how to solve this error?

expected to find "112.00" in page, but it wasn't found 

Log 
sending POST request to /login 
sending POST request to /buy 
checking that "112.00" is in page 

3 Answers 3

0

check50 is parsing the page (index.html) that shows all of the holdings after the purchase has been made.

Are you using the usd function from helpers to format your dollar amounts?

2

The problem might be that your page rounds it to 112, or 112.0, while check50 wants it displayed as 112.00.

You might want to that like this:

roundedvalue = "{0:.2f}".format(oldvalue)

Please accept the answer if this answers your question. Let's keep up on forum maintenance ;)

2
  • I hadn't thought of that but sadly it's not the solution. I've tried making a new page to which you are directed once you have bought a stock, which states the name, symbol, price, shares and total price, just so that it literally can't be missed. It still won't accept it. Maybe its something to do with the stock they use to test it since it apparently always has the value of 112.00 it might be that it doesn't use the same formatting as other stocks from the API??
    – Mike Betto
    Commented Aug 7, 2018 at 17:12
  • Have you finished your implementation of index yet? If not, you might want to hold off on this until then, to see if that solves your problem.
    – user3256
    Commented Aug 7, 2018 at 17:37
0

inside your index.html, while using jinja syntax to display currency anywhere such as price or total price etc by "{{ share["price"] }}" instead use this "{{ share["price"] | usd}}",add "| usd" and it will resolve your problem and check50 will no more give you error, check50 will give you error again in history.html, you need to do the same and use "| usd" inside your jinja syntax and your problem will be surely resolved.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .