Ejemplo n.º 1
0
def test_raw_calls_all_throwing(get_processor):
    patch_processing()
    get_processor.side_effect = raise_exception

    with pytest.raises(Exception):
        processing.process_raw(mock.MagicMock(), {})
    unpatch_processing()
Ejemplo n.º 2
0
def test_raw_calls_all_throwing(get_processor):
    get_processor.side_effect = lambda x: Exception(
        'Reasons') if x == 'storage' else mock.Mock()

    processing.process_raw(mock.MagicMock(), {})

    for processor in settings.RAW_PROCESSING:
        get_processor.assert_any_call(processor)
Ejemplo n.º 3
0
def process_raw(raw_doc, **kwargs):
    processing.process_raw(raw_doc, kwargs)
Ejemplo n.º 4
0
def test_raw_calls_all(get_processor):
    processing.process_raw(mock.MagicMock(), {})

    for processor in settings.RAW_PROCESSING:
        get_processor.assert_any_call(processor)
Ejemplo n.º 5
0
def process_raw(raw_doc, **kwargs):
    processing.process_raw(raw_doc, kwargs)
Ejemplo n.º 6
0
def test_raw_calls_all(get_processor):
    processing.process_raw(mock.MagicMock(), {})

    for processor in settings.RAW_PROCESSING:
        get_processor.assert_any_call(processor)