Added a unit test for setting a cookie with expires_days

Hi.

I added a unit test for setting a cookie with expires_days.

Thanks.
Instead of counting characters, save the match object returned by re.match and get the expires value from that.