'Test that a page which has a end date in the past gives a 404, not a
500.'

def test_page_already_expired(self):

    yesterday = (tz_now() - datetime.timedelta(days=1))
    with self.settings(CMS_PERMISSION=False):
        page = create_page('page', 'nav_playground.html', 'en', publication_end_date=yesterday, published=True)
        resp = self.client.get(page.get_absolute_url('en'))
        self.assertEqual(resp.status_code, 404)
