fix running test_capi with -R ::

Also, fix a refleak in the test that was preventing running. :)
1 file changed