Tweak test_discount_id_by_code(). #2302