'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/%s/%s' % (self.prefix, filename)))
        response_content = ''.join(response)
        file_path = path.join(media_dir, filename)
        with open(file_path, 'rb') as fp:
            self.assertEqual(fp.read(), response_content)
        self.assertEqual(len(response_content), int(response['Content-Length']))
        self.assertEqual(mimetypes.guess_type(file_path)[1], response.get('Content-Encoding', None))
