Added --no-option's and made args more config-friendly.

This commit is contained in:
Jakub Roztocil committed 2012-09-24 06:49:12 +02:00
1 parent bbc702fa11
commit 5d969852c7
4 files changed
+76 -12

No files matched your search

+22
View File
@@ -1236,6 +1236,28 @@ class ArgumentParserTestCase(unittest.TestCase):
])
class TestNoOptions(BaseTestCase):
def test_valid_no_options(self):
r = http(
'--verbose',
'--no-verbose',
'GET',
httpbin('/get')
)
self.assertNotIn('GET /get HTTP/1.1', r)
def test_invalid_no_options(self):
r = http(
'--no-war',
'GET',
httpbin('/get')
)
self.assertEqual(r.exit_status, 1)
self.assertIn('unrecognized arguments: --no-war', r.stderr)
self.assertNotIn('GET /get HTTP/1.1', r)
class READMETest(BaseTestCase):
@skipIf(not has_docutils(), 'docutils not installed')