Fix test_pop() method