1
0
mirror of https://github.com/httpie/cli.git synced 2026-04-26 20:02:11 +02:00

Validate "file fields (name@/path) require --form / -f".

This commit is contained in:
Jakub Roztocil
2012-07-29 06:58:50 +02:00
parent 16635870e3
commit f73bfea6b8
3 changed files with 22 additions and 3 deletions
+11
View File
@@ -515,6 +515,17 @@ class VerboseFlagTest(BaseTestCase):
self.assertIn('HTTP/1.1 200', r)
self.assertIn('foo=bar&baz=bar', r)
def test_verbose_json(self):
r = http(
'--verbose',
'POST',
httpbin('/post'),
'foo=bar',
'baz=bar'
)
self.assertIn('HTTP/1.1 200', r)
self.assertEqual(r.count('"baz": "bar"'), 2)
class MultipartFormDataFileUploadTest(BaseTestCase):