예제 #1
0
파일: __init__.py 프로젝트: hkwi/cmonkey
 def test_parse_error_invalid_t(self):
     sys.argv = [
         'cmonkey',
         '-t', 'foo',
         'listUsers',
     ]
     _parse_args()
예제 #2
0
파일: __init__.py 프로젝트: hkwi/cmonkey
 def test_parse_error_required_a(self):
     sys.argv = [
         'cmonkey',
         '-s', 'bar',
         'listUsers',
     ]
     _parse_args()
예제 #3
0
파일: __init__.py 프로젝트: hkwi/cmonkey
 def test_parse_error_required_s(self):
     sys.argv = [
         'cmonkey',
         '-a', 'foo',
         'listUsers',
     ]
     _parse_args()
예제 #4
0
파일: __init__.py 프로젝트: hkwi/cmonkey
 def test_parse_error_required_p(self):
     sys.argv = [
         'cmonkey',
         '-t', 'cookie',
         '-u', 'foo',
         'listUsers',
     ]
     _parse_args()
예제 #5
0
파일: __init__.py 프로젝트: hkwi/cmonkey
 def test_parse_error_required_u(self):
     sys.argv = [
         'cmonkey',
         '-t', 'cookie',
         '-p', 'bar',
         'listUsers',
     ]
     _parse_args()
예제 #6
0
파일: __init__.py 프로젝트: hkwi/cmonkey
 def test_get_client_integration(self):
     sys.argv = [
         'cmonkey',
         '-t', 'integration',
         'listUsers',
     ]
     args = _parse_args()
     client = _get_client(args)
     ok_(isinstance(client, IntegrationClient))
예제 #7
0
파일: __init__.py 프로젝트: hkwi/cmonkey
 def test_get_client_default(self):
     sys.argv = [
         'cmonkey',
         '-a', 'foo',
         '-s', 'bar',
         'listUsers',
     ]
     args = _parse_args()
     client = _get_client(args)
     ok_(isinstance(client, SignatureClient))
예제 #8
0
파일: __init__.py 프로젝트: hkwi/cmonkey
 def test_get_client_cookie(self):
     sys.argv = [
         'cmonkey',
         '-t', 'cookie',
         '-u', 'foo',
         '-p', 'bar',
         'listUsers',
     ]
     args = _parse_args()
     client = _get_client(args)
     ok_(isinstance(client, CookieClient))
예제 #9
0
파일: __init__.py 프로젝트: hkwi/cmonkey
 def test_exec_error_invalid_param(self):
     sys.argv = [
         'cmonkey',
         '-t', 'cookie',
         '-u', 'foo',
         '-p', 'bar',
         'listUsers',
         'a',
     ]
     args = _parse_args()
     _request(args)
예제 #10
0
파일: __init__.py 프로젝트: hkwi/cmonkey
 def test_parse_default_signature(self):
     sys.argv = [
         'cmonkey',
         '-a', 'foo',
         '-s', 'bar',
         'listUsers',
     ]
     args = _parse_args()
     eq_(args.entry_point, 'http://localhost:8080/client/api')
     eq_(args.authentication_type, 'signature')
     eq_(args.api_key, 'foo')
     eq_(args.secret_key, 'bar')
     eq_(args.username, None)
     eq_(args.password, None)
     eq_(args.digested_password, False)
     eq_(args.hide_status_code, False)
     eq_(args.hide_headers, False)
     eq_(args.hide_content_body, False)
     eq_(args.pretty_print, False)
     eq_(args.parameters, ['listUsers'])