'Test the 404 view as if called in a microsite.'

def test_404_microsites(self):

    url = reverse('static_template_view.views.render_404')
    resp = self.client.get(url)
    self.assertEqual(resp.status_code, 200)
    self.assertEqual(resp['Content-Type'], 'text/html')
    resp = self.client.get(url, HTTP_HOST=settings.MICROSITE_TEST_HOSTNAME)
    self.assertContains(resp, settings.MICROSITE_CONFIGURATION['test_site']['email_from_address'])
