check50

cs50/problems/2023/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

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 /signin
sending GET request to /login
found required "username" field
found required "password" field

:) logging in as registered user succceeds

Log
sending GET request to /signin
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 GET request to /signin
sending POST request to /login
sending GET request to /quote
found required "symbol" field

:) quote handles invalid ticker symbol

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

:) quote handles blank ticker symbol

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

:) quote handles valid ticker symbol

Log
sending GET request to /signin
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 GET request to /signin
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 GET request to /signin
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 GET request to /signin
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
application raised an exception (see the log for more details)

Log
sending GET request to /signin
sending POST request to /login
sending POST request to /buy
exception raised in application: TypeError: 'NoneType' object is not subscriptable

:| 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