scrapi.processing.process_raw

Here are the examples of the python api scrapi.processing.process_raw taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

3 Examples 7

Example 1

Project: scrapi
Source File: test_processing.py
View license
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()

Example 2

Project: scrapi
Source File: tasks.py
View license
@task_autoretry(default_retry_delay=settings.CELERY_RETRY_DELAY, max_retries=settings.CELERY_MAX_RETRIES)
@events.logged(events.PROCESSING, 'raw')
def process_raw(raw_doc, **kwargs):
    processing.process_raw(raw_doc, kwargs)

Example 3

Project: scrapi
Source File: test_processing.py
View license
def test_raw_calls_all(get_processor):
    processing.process_raw(mock.MagicMock(), {})

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