[tests] Use pytest.raises and fix typos.

5 jobs for delayed-sample-modification in 11 minutes and 58 seconds (queued for 3 seconds)