'Tests that URLs are automatically reloaded when the ApphookReload
middleware is installed.'

def test_urls_reloaded(self):

    superuser = get_user_model().objects.create_superuser('admin', 'admin@admin.com', 'admin')
    page = create_page('home', 'nav_playground.html', 'en', created_by=superuser)
    page.publish('en')
    app_page = create_page('app_page', 'nav_playground.html', 'en', created_by=superuser, parent=page, published=False, apphook='SampleApp')
    self.client.get('/')
    (current_revision, _) = UrlconfRevision.get_or_create_revision()
    app_page.publish('en')
    self.client.get('/')
    (new_revision, _) = UrlconfRevision.get_or_create_revision()
    self.assertNotEquals(current_revision, new_revision)
