'The raw source for a document can be requested'

@override_config(KUMA_WIKI_IFRAME_ALLOWED_HOSTS='^https?\\:\\/\\/testserver')
def test_code_sample_1(self):

    rev = revision(is_approved=True, save=True, content='\n                                                <p>This    is    a    page.    Deal    with    it.</p>\n                                                <div    id="sample1"    class="code-sample">\n                                                                <pre    class="brush:    html">Some    HTML</pre>\n                                                                <pre    class="brush:    css">.some-css    {    color:    red;    }</pre>\n                                                                <pre    class="brush:    js">window.alert("HI    THERE")</pre>\n                                                </div>\n                                                <p>test</p>\n                                                {{    EmbedLiveSample(\'sample1\')    }}\n                                ')
    expecteds = ('<style    type="text/css">.some-css    {    color:    red;    }</style>', 'Some    HTML', '<script    type="text/javascript">window.alert("HI    THERE")</script>')
    Switch.objects.create(name='application_ACAO', active=True)
    response = self.client.get(reverse('wiki.code_sample', args=[rev.document.slug, 'sample1']), HTTP_HOST='testserver')
    ok_(('Access-Control-Allow-Origin' in response))
    eq_('*', response['Access-Control-Allow-Origin'])
    eq_(200, response.status_code)
    normalized = normalize_html(response.content)
    ok_(('<!DOCTYPE    html>' in response.content))
    for item in expecteds:
        ok_((item in normalized))
