Esempio n. 1
0
def test_recent_event_list_with_no_events(rf):
    """Test that the response has a status code 200 when there are no
    Events in the database.
    """
    request = rf.get('/')
    response = views.recent_event_list(request)
    assert response.status_code == 200
Esempio n. 2
0
def test_recent_event_list_returns_ok(rf):
    factories.EventFactory.create_batch(30)
    request = rf.get('/')
    response = views.recent_event_list(request)
    assert response.status_code == 200