From 47a9a04145e30476c162a1d76d4d8b4b360de0bd Mon Sep 17 00:00:00 2001 From: kali Date: Tue, 23 Oct 2012 00:34:39 +0900 Subject: allow to test auth from cli --- src/leap/base/auth.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/leap/base/auth.py b/src/leap/base/auth.py index 7d99a7fe..5a9ebe1d 100644 --- a/src/leap/base/auth.py +++ b/src/leap/base/auth.py @@ -246,13 +246,14 @@ def magic_srpauth(fn): if __name__ == "__main__": + import sys + user = sys.argv[1] + passwd = sys.argv[2] - TEST_USER = "test1" - TEST_PASS = "1234" - - @srpauth_protected(user=TEST_USER, passwd=TEST_PASS) + @srpauth_protected(user=user, passwd=passwd) def test_srp_protected_get(*args, **kwargs): req = requests.get(*args, **kwargs) - print req.content + req.raise_for_status + #print req.content test_srp_protected_get('http://springbok/1/cert') -- cgit v1.2.3