Use the right exception type
Call get_block on block context
Add more tests