Пример #1
0
 def testView(self):
     rf = RequestFactory()
     path = '/horiz_img_r300x400.jpg'
     document_root = os.path.abspath(os.path.join(os.path.dirname(__file__), 'testdata'))
     request = rf.get('%s?%s' % (path, self.doShaHash("_r300x400")))
     import views
     response = views.transmogrify_serve(request, path, document_root)
     self.assertEqual(response.status_code, 200)
Пример #2
0
        def test_view(self):
            rf = RequestFactory()
            path = "/horiz_img_r300x400.jpg"
            document_root = TESTDATA
            request = rf.get("%s?%s" % (path, self.do_sha_hash("_r300x400")))
            import views

            response = views.transmogrify_serve(request, path, document_root)
            self.assertEqual(response.status_code, 200)