rustpkg: Cleanup

Just refactoring in tests.rs.