From 57948fb06ae7bac172e9e8a87a877883c0136f0a Mon Sep 17 00:00:00 2001 From: Matt Schwager Date: Thu, 17 Aug 2017 12:53:35 -0400 Subject: Fix duo_openvpn tests ``` $ python test_duo_openvpn.py ....................... ---------------------------------------------------------------------- Ran 23 tests in 0.018s OK ``` --- test_duo_openvpn.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/test_duo_openvpn.py b/test_duo_openvpn.py index 87d20d1..86420d5 100644 --- a/test_duo_openvpn.py +++ b/test_duo_openvpn.py @@ -120,7 +120,7 @@ class TestIntegration(unittest.TestCase): meth.AndReturn(response) self.expected_calls.close() - def expect_preauth(self, result, path=EXPECTED_PREAUTH_PATH): + def expect_preauth(self, result, path=EXPECTED_PREAUTH_PATH, factor='push1'): self.expect_request( method='POST', path=path, @@ -132,6 +132,7 @@ class TestIntegration(unittest.TestCase): 'response': { 'result': result, 'status': 'expected status', + 'factors': {'default': factor}, }, }), ), @@ -384,16 +385,12 @@ class TestIntegration(unittest.TestCase): ) def test_missing_password(self): - environ = { - 'ikey': self.IKEY, - 'skey': self.SKEY, - 'host': self.HOST, - 'username': self.USERNAME, - 'ipaddr': self.IPADDR, - } + environ = self.normal_environ() + del environ['password'] + self.expect_preauth('auth', factor=None) self.assert_auth( environ=environ, - expected_control='', + expected_control='0', ) def test_missing_ikey(self): -- cgit v1.2.3