One easy way to debug tests in openstack using pdb, is to include the sentence:
import pdb; pbd.set_trace()
at the begining of the test is failing, and re-run it with the --nocapture option:
ghe@debian:glance(master)$ ./run_tests.sh -N glance.tests.functional.v1.test_api --nocapture
We test the following: ... > /home/ghe/github/openstack/glance/glance/tests/functional/v1/test_api.py(1170)test_delete_not_existing()
-> self.cleanup()
(Pdb)
Happy sysadmin day!