There's a mechanism to create product in spec tests and have them cleaned up for you even if the test fails, see candlepin_scenarios create_product.