def test_EXP(self, mock_az, mock_pk, mock_csm): ret, bad = ntor._EXP('n', 'p') mock_pk.assert_called_once_with('p') mock_csm.assert_called_once_with('n', 'pk') mock_az.assert_called_once_with('sm') self.assertEqual(ret, 'sm') self.assertFalse(bad)
def test_EXP_bad(self, mock_az, mock_pk, mock_csm): ret, bad = ntor._EXP('n', 'p') mock_pk.assert_called_once_with('p') mock_csm.assert_called_once_with('n', 'pk') self.assertTrue(bad)