Ejemplo n.º 1
0
def test_handler_bad_type(config_mock, failure_mock):
    """App Integration - Test Handler, Bad Service Type"""
    base_config = get_valid_config_dict('duo_auth')
    base_config.update({'type': 'bad_type', 'current_state': 'running'})
    config_mock.return_value = AppConfig(base_config)
    handler(None, get_mock_context())

    failure_mock.assert_called()
Ejemplo n.º 2
0
def test_handler_success(gather_mock, config_mock, failure_mock):
    """App Integration - Test Handler, Success"""
    base_config = get_valid_config_dict('duo_auth')
    config_mock.return_value = AppConfig(base_config)
    gather_mock.return_value = None
    handler(None, get_mock_context())

    failure_mock.assert_not_called()
Ejemplo n.º 3
0
def test_handler():
    """App Integration - Test Handler"""
    handler(None, get_mock_context())