'The static view can serve static media'

def test_serve(self):

    media_files = ['file.txt', 'file.txt.gz']
    for filename in media_files:
        response = self.client.get(('/views/site_media/%s' % filename))
        file_path = path.join(media_dir, filename)
        self.assertEquals(open(file_path).read(), response.content)
        self.assertEquals(len(response.content), int(response['Content-Length']))
        self.assertEquals(mimetypes.guess_type(file_path)[1], response.get('Content-Encoding', None))
