def test_posts_atom(client, silly_posts):
    # check the main feed
    rv = client.get('/', query_string={'feed': 'atom'})
    assert 200 == rv.status_code
    assert rv.content_type.startswith('application/atom+xml')
    content = rv.get_data(as_text=True)
    assert 'Probably a &lt;i&gt;dumb&lt;/i&gt; joke' in content
    assert 'First interesting article' in content

    # check the everything feed
    rv = client.get('/everything/', query_string={'feed': 'atom'})
    assert 200 == rv.status_code
    assert rv.content_type.startswith('application/atom+xml')
    content = rv.get_data(as_text=True)
    assert 'mal.colm/reynolds' in content  # a hidden post
    assert 'First interesting article' in content

    # check the notes feed
    rv = client.get('/notes/', query_string={'feed': 'atom'})
    assert 200 == rv.status_code
    assert rv.content_type.startswith('application/atom+xml')
    content = rv.get_data(as_text=True)
    assert 'Probably a &lt;i&gt;dumb&lt;/i&gt; joke' in content
    assert 'First interesting article' not in content
dataset/ETHPy150Open kylewm/redwind/tests/views_test.py/test_posts_atom/original