Comments (2)
You should report this to https://github.com/kmike/django-webtest /cc @kmike
from webtest.
Following this issue, i found another issue, form.submit() fails on 403, when csrf token is present and found and defined. On real server nothing fails with this error.
What solved both issues, is following:
class MyTests(WebTest):
extra_environ = {'HTTP_HOST': 'myhost.com:8000'}
.....
Both issues came up from following settings in django.conf.settings:
SESSION_COOKIE_DOMAIN = '.myhost.com:8000'
CSRF_COOKIE_DOMAIN = '.myhost.com:8000'
CSRF_COOKIE_NAME = 'myhostcsrf'
Those settings are used to enable my apps to work with domain and its subdomains, allowing for single site login and such.
i do not know if its related to webtest or to django-webtest, but showing here my solution if someone will come here seeking a remedy for same painful issue and hopefully, this will save hours of a real headache i had.
from webtest.
Related Issues (20)
- Add docs build to Travis-CI HOT 2
- Session cookie is not passed with request HOT 2
- Add GitHub templates for support HOT 11
- Default value for button and submit is wrong HOT 6
- Webtest fails with PYTHONOPTIMIZE=2 HOT 1
- `MultipleSelect().value = []` doesn't work HOT 2
- webtest.forms.Radio() pays no attention to the 'disabled' attribute of <input type="radio"> HOT 1
- Can we (optionally) allow for malformed JSON content when testing? HOT 3
- urllib.parse.splithost() is deprecated as of 3.8 HOT 2
- Forms with default action wrongly submit to "/" HOT 1
- head() got an unexpected keyword argument 'params'
- Fix simple typo: requets -> requests
- Is there any way to open a popup form when click? HOT 2
- Allow checking client-side validation during form submit HOT 2
- TestResponse.lxml raises ValueError on XML responses due to ElementTree construction from unicode string
- Can't have more then 1 form in html HOT 2
- Multiple file input support
- DELETE params does not behave like GET
- PyQuery object doesn't use the correct parser
- Prettify HTML output
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webtest.