-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue/1479 #1485
Open
sanredz
wants to merge
64
commits into
httpie:master
Choose a base branch
from
sanredz:issue/1479
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Issue/1479 #1485
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This moves the load_template function to the argtemplate file as well as makes the file path where the templates are stored into a global variable.
Some tests fail when run on Mac but not on Windows. There appears to be minor differences in the error output.
This adds a unit test that checks that a value is correctly updated when modifying a certain parameter, and leaving the other values unchanged.
This includes one test for overwriting an already existing template, which passes, and one test for storing a template with an invalid method parameter, which currently fails (see #11).
This removes a debugging print statement and adds some assertions.
Most of them currently fail since the functionality hasn't been implemented/merged yet. Fixes #6
Mrporsev/work on editt
Fix formatting issues related to #14
bug(template): Fix invalid argument error #11
Add unit tests
bug(test): Fix formatting for tests #18
This makes sure that there is an error message printed when trying to use a template that doesn't exist and makes sure that no unhandled exceptions occur.
Fix error when trying to load nonexistent template
This removes tests that went against the specification and updates `test_edit_template_not_found` to not look for an exception anymore, since no exception is being raised. Fixes #28
This adds tests that increases test coverage for argtemplate.py to 98%. Fixes #30
Parameters after the URL that do not have the form key=value will now be ignored. When loading a template, the parameters will be reconstructed the same way they were passed in, i.e. as param=value. Fixes #12
Add tests to increase coverage
Update keys when loading/storing templates
docs(templates): Add documentation to functions in argtemplates #15
The cases for too few args are not covered by tests since http() automatically adds some flags which makes it impossible to test.
Add more unit tests
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds work towards Issue #1479
We added functionality, and accompanying tests, for four commands:
http template
It is used to create a new command template. It takes three parameters at a minimum and then after that it also accepts key/value pairs, not single params like --something
http editt
It is used to edit a template. It takes three parameter no equality signs. It does not take multiple.
http runt
Runs a command. It takes one parameter .
http delt
Deletes a template. It takes one parameter
The changes are:
We are a group of KTH students and this was for a school project. Our time ran out so we didn't have time to fully develop it.
Things that would be good to add: