Added tests to onchange_amount
The check for context isn't necessary