changing warning test to use assert_raises_message