Mickaël Schoentgen
a3a08a9a22
Use relative imports ( #1057 )
...
* Use relative imports in test
* Use relative imports
* Add myself to contributors :)
2021-05-05 14:13:39 +02:00
Mickaël Schoentgen
1274d869f6
Replace usage of mock with unittest.mock ( #1054 )
...
Since Python 3, the mock dependency is no more required as
it is already part of the unittest module.
2021-04-30 15:08:27 +02:00
Jakub Roztocil
2afdc958c6
Update URLs
2020-12-23 22:07:27 +01:00
Jakub Roztocil
b86598886e
Added netrc support for auth plugins.
...
Enabled for --auth-type=basic and digest, 3rd parties may opt in.
This closes #718 , closes #719 , closes #852 , and also closes #934
2020-06-16 11:05:00 +02:00
Nicolas Beltran
c240162cab
Added a test that verifies .netrc is honored when only --auth-type is passed
2020-06-16 10:07:41 +02:00
Jakub Roztocil
bece3c77bb
Add one-by-one processing of each HTTP request or response and --offline
2019-09-03 17:14:39 +02:00
Jakub Roztocil
aba3b1ec01
Refactoring
2019-08-31 15:17:10 +02:00
Jakub Roztocil
3e24827f4d
Test that --ignore-netrc
doesn't interfere with --auth
2019-08-31 12:14:44 +02:00
Jakub Roztocil
1dc67a6a38
Allow bypassing .netrc with --ignore-netrc
( close #730 )
2019-08-31 12:09:17 +02:00
Jakub Roztocil
11be041e06
Rename TestEnvironment
to MockEnvironment
to avoid pytest warnings
...
Close #621
2017-12-28 18:17:48 +01:00
Jakub Roztocil
c948f98b05
Update links
2017-03-10 11:27:38 +01:00
Jakub Roztocil
3f7ed35238
Add more plugin API tests
2016-11-23 23:09:45 +01:00
Jakub Roztocil
a49774d3ab
Extend auth plugin API
...
This extends the `AuthPlugin` API by the following attributes:
* `auth_require`: set to `False` to make `--auth, -a` optional
* `auth_parse`: set to `False` to disable `username:password` parsing
(access the raw value passed to `-a` via `self.raw_auth`).
* `prompt_password`: set to`False` to disable password prompt when
no password provided (only relevant when `auth_parse == True`)
These changes should be 100% backwards-compatible.
What needs more testing is auth support in sessions.
Close #433
Close #431
Close #378
Ping teracyhq/httpie-jwt-auth#3
2016-11-23 22:02:12 +01:00
Jakub Roztocil
a6ebc44a48
Run tests against both HTTP and HTTPS
...
Some of the tests now use the `httpbin_both` fixture from pytest-httpbin.
Also, made httpbin's CA trusted by default and added `httpbin_secure_untrusted`
fixture to allow overriding that for particular tests.
2016-03-06 17:42:35 +08:00
Jakub Roztocil
4e574e6b8e
Cleanup tests
2016-03-03 18:50:18 +08:00
Michael Floering
deb7b747cc
Small fix for Python 2.6 compatibility.
...
Relates to #430 / #432 .
2016-01-22 18:46:36 -06:00
Michael Floering
018e1f68de
Merge remote-tracking branch 'upstream/master'
2016-01-22 18:40:53 -06:00
Michael Floering
ac69d4311b
add -A
as short arg for --auth-type
...
Addresses #430
comes with unit test
2016-01-22 18:37:30 -06:00
Luis San Martin
45df860124
PEP8 errors
2015-10-22 14:32:16 -03:00
Jakub Roztocil
2b51cb6687
Updated links II.
2015-07-03 18:55:45 +02:00
Jakub Roztocil
ca36f1de04
Handle empty passwords in URL credentials
...
Closes #242
2014-07-18 13:39:47 +02:00
Jakub Roztocil
2a72ae23d5
Run tests against local httpbin instance via pytest-httpbin.
2014-06-28 16:38:41 +02:00
Jakub Roztocil
2aa53e4be3
Avoid “__init__.py” files in test directories.
...
As recommended here:
https://pytest.org/latest/goodpractises.html
2014-04-28 11:29:41 +02:00
Jakub Roztocil
87806acc56
Cleanup
2014-04-26 23:06:39 +02:00
Jakub Roztocil
15e62ad26d
Implemented more robust unicode handling.
...
* Immediatelly convert all args from `bytes` to `str`.
* Added `Environment.stdin_encoding` and `Environment.stdout_encoding`
* Allow unicode characters in HTTP headers and basic auth credentials
by encoding them using UTF8 instead of latin1 (#212 ).
2014-04-26 15:07:31 +02:00
Jakub Roztocil
3c2de34285
Improved auth tests.
2014-04-25 13:10:01 +02:00
Jakub Roztocil
af4aa3a761
Test improvements.
2014-04-25 12:18:35 +02:00
Jakub Roztocil
27faf06327
Removed last dependencies on unittest. All tests are pytest-only.
2014-04-25 11:39:59 +02:00
Jakub Roztocil
3cb124bba7
Cleanup
...
XX
2014-04-24 19:32:50 +02:00
Jakub Roztocil
6f28624134
Switched to @pytest.mark.skipif.
2014-04-24 15:17:23 +02:00
Jakub Roztocil
b880e996d0
Converted all unittest asserts to plain, pytest-powered asserts.
2014-04-24 14:58:15 +02:00
Jakub Roztocil
6071fff4af
Refactored tests into smaller modules.
2014-04-24 14:07:31 +02:00