I wanted to check if a browser accepts cookies, so I used set_test_cookie and test_cookie_worked methods to check the same. Then I deleted the test cookies using delete_test