Skip to content

Commit d61862b

Browse files
committed
Add test to check when an acceptor name is bad
Had this in my tree but forgot to add to the commit. Related to #131 Signed-off-by: Simo Sorce <simo@redhat.com>
1 parent a9bbb84 commit d61862b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/t_bad_acceptor_name.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/python
2+
# Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license.
3+
4+
import os
5+
import requests
6+
from stat import ST_MODE
7+
from requests_kerberos import HTTPKerberosAuth, OPTIONAL
8+
9+
10+
if __name__ == '__main__':
11+
sess = requests.Session()
12+
url = 'http://%s/bad_acceptor_name/' % os.environ['NSS_WRAPPER_HOSTNAME']
13+
r = sess.get(url, auth=HTTPKerberosAuth(delegate=True))
14+
if r.status_code != 200:
15+
raise ValueError('Bad Acceptor Name failed')

0 commit comments

Comments
 (0)