-
Notifications
You must be signed in to change notification settings - Fork 312
Closed
Description
Is your feature request related to a problem? Please describe.
The validOrder function given in code.py returns a string in the event of success and a string in the event of an error but the successful solution needed is one that actually ignores an invalid amount or quantity rather than return an error string when encountering it because of the specific output hack.py is looking for. solution.py returns a error string in other cases, just not there.
Describe the solution you'd like
hack.pycould be testing using assetNotEqual to check that the attempt to purchase the items fraudulently simply did not succeed in some way- Unrelated to this but
hack.pyshould be attempting to exploit both the amount and quantity properties
Describe alternatives you've considered
Other options include:
- pydoc for validOrder indicating the response strings expected in different scenarios ("An unexpected error occurred" for an error case, for example)
hack.pycould expect the same error string as returned in line 28 (though that message will need tweaking, again "An unexpected error occurred" or "something went wrong" could work)validOrdercould be a function that calculates the balance given the items and raises an exception when an invalid state is reached, that wayhack.pycould check for an exception being thrown and the output is more regular
Metadata
Metadata
Assignees
Labels
No labels