Comments (8)
Basically adding correct default to all methods would fix this. With a test case that warning is raised and adding stacklevel
param to the warning.
from webtest.
I could make a PR if you’re patient with my lack of git-fu.
from webtest.
Sure, how can I help? :)
from webtest.
I know how to clone, commit and push, but merging is still infuriatingly confusing to me, so if I use the wrong branch or get an unmergeable PR, I’ll need help :)
from webtest.
Workflow is the following:
- you fork this repo
- git clone your fork
- commit changes
- push back to your repo
- on github, click "pull request", review changes and submit it
On Mon, Mar 4, 2013 at 6:40 AM, Éric Araujo [email protected]:
I know how to clone, commit and push, but merging is still infuriatingly
confusing to me, so if I use the wrong branch or get an unmergeable PR,
I’ll need help :)—
Reply to this email directly or view it on GitHubhttps://github.com//issues/50#issuecomment-14364792
.
from webtest.
Yep, I know the basic flow as I said in my previous message, it’s really the branching model and the synchronization that don’t fit my head yet.
Basically adding correct default to all methods would fix this.
I did that and it does remove the spurious warning for DELETE.
With a test case that warning is raised and adding stacklevel param to the warning.
Problem is that warnings use their own reporting system, so you can’t just use assertRaises. In the stdlib we have special helpers to check that a warning was sent, but there’s nothing to do that in webtest at present.
stacklevel=3 does the right thing (3 = _gen_request → delete method → caller). I wanted to separate the two changes in two commits and then git hated me so I won’t push anything today, but I wanted to confirm the fixes.
from webtest.
I think the correct way is to fix the warning issuing logic. Why is checking for if method == 'DELETE' and params:
not enough? How is u''
non-empty?
from webtest.
Thanks for the fix @noonat ! The stacklevel value is still the old one, I may open another ticket for that.
from webtest.
Related Issues (20)
- 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
- Perform real HTTP requests when needed HOT 2
- Add default headers to TestApp HOT 1
- lxml as BeautifulSoup parser HOT 1
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.