import json


def existing_summary(test_app_with_db, mocked_summarizer):
    """Prepare a summary to use in tests."""
    summary_url = 'http://example.com'

    response = test_app_with_db.post('/summaries/', data=json.dumps({'url': summary_url}))
    summary_id = response.json()['id']

    return summary_id, summary_url