django-test-utils icon indicating copy to clipboard operation
django-test-utils copied to clipboard

Submit and cookies

Open msgre opened this issue 14 years ago • 0 comments

Hello Eric, I try using twill to my tests but I am unable to successfully submit form via POST as logged user. Look at this code:

login(username="myusername", password="mypassword") go('/myurl/') fv(2, 'continue', '') submit()

problem

logout()

If I print show_cookies() I get different value before and after submit. On this test I want to check, if application return the same page with form together with error messages due to mandatory form fields. But all I get is login page (because POST don't set cookies, and my code put redirection to login page).

msgre avatar Aug 31 '10 13:08 msgre