Remove use of undeclared variable in assert_none