Include RPM spec file in dist package.
[mod_auth_gssapi.git] / tests / t_spnego.py
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 requests_kerberos import HTTPKerberosAuth, OPTIONAL
7
8
9 if __name__ == '__main__':
10     sess = requests.Session()
11     url = 'http://%s/spnego/' % os.environ['NSS_WRAPPER_HOSTNAME']
12     r = sess.get(url, auth=HTTPKerberosAuth())
13     if r.status_code != 200:
14         raise ValueError('Spnego failed')