check50

cs50/problems/2024/x/finance


:) app.py exists

Log
checking that app.py exists...

:) application starts up

Log
sending GET request to /
checking that status code 200 is returned...

:) register page has all required elements

Log
sending GET request to /register
found required "username" field
found required "password" field
found required "confirmation" field

:) registering user succeeds and portfolio page is displayed

Log
sending POST request to /register
checking that status code 200 is returned...

:) registration with an empty field fails

Log
sending POST request to /register
checking that status code 400 is returned...
sending POST request to /register
checking that status code 400 is returned...
sending POST request to /register
checking that status code 400 is returned...

:) registration with password mismatch fails

Log
sending POST request to /register
checking that status code 400 is returned...

:) registration rejects duplicate username

Log
sending POST request to /register
checking that status code 200 is returned...
sending POST request to /register
checking that status code 400 is returned...

:) login page has all required elements

Log
sending GET request to /login
found required "username" field
found required "password" field

:) logging in as registered user succceeds

Log
sending POST request to /login
checking that status code 200 is returned...
sending GET request to /
checking that status code 200 is returned...

:) quote page has all required elements

Log
sending POST request to /login
sending GET request to /quote
found required "symbol" field

:) quote handles invalid ticker symbol

Log
sending POST request to /login
sending POST request to /quote
checking that status code 400 is returned...

:) quote handles blank ticker symbol

Log
sending POST request to /login
sending POST request to /quote
checking that status code 400 is returned...

:) quote handles valid ticker symbol

Log
sending POST request to /login
sending POST request to /quote
checking that status code 200 is returned...
checking that "28.00" is in page

:) buy page has all required elements

Log
sending POST request to /login
sending GET request to /buy
found required "symbol" field
found required "shares" field

:) buy handles invalid ticker symbol

Log
sending POST request to /login
sending POST request to /buy
checking that status code 400 is returned...

:) buy handles fractional, negative, and non-numeric shares

Log
sending POST request to /login
sending POST request to /buy
checking that status code 400 is returned...
sending POST request to /buy
checking that status code 400 is returned...
sending POST request to /buy
checking that status code 400 is returned...

:( buy handles valid purchase

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

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

:| sell page has all required elements

Cause
can't check until a frown turns upside down

:| sell handles invalid number of shares

Cause
can't check until a frown turns upside down

:| sell handles valid sale

Cause
can't check until a frown turns upside down

:| history page shows transactions

Cause
can't check until a frown turns upside down