def test_serve(self):
        "The static view can serve static media"
        media_files = ['file.txt',]
        for filename in media_files:
            response = self.client.get('/views/site_media/%s' % filename)
            file = open(path.join(media_dir, filename))
            self.assertEquals(file.read(), response.content)
            self.assertEquals(len(response.content), int(response['Content-Length']))
dataset/ETHPy150Open dcramer/django-compositepks/tests/regressiontests/views/tests/static.py/StaticTests.test_serve/original