Exemplo n.º 1
0
 def test_get_text_file(self):
     backend = _test_backend([], named_files={'description': 'foo'})
     mat = re.search('.*', 'description')
     output = ''.join(get_text_file(self._req, backend, mat))
     self.assertEquals('foo', output)
     self.assertEquals(HTTP_OK, self._status)
     self.assertContentTypeEquals('text/plain')
     self.assertFalse(self._req.cached)
Exemplo n.º 2
0
 def test_get_text_file(self):
     backend = _test_backend([], named_files={"description": b"foo"})
     mat = re.search(".*", "description")
     output = b"".join(get_text_file(self._req, backend, mat))
     self.assertEqual(b"foo", output)
     self.assertEqual(HTTP_OK, self._status)
     self.assertContentTypeEquals("text/plain")
     self.assertFalse(self._req.cached)
Exemplo n.º 3
0
 def test_get_text_file(self):
     backend = _test_backend([], named_files={'description': 'foo'})
     mat = re.search('.*', 'description')
     output = ''.join(get_text_file(self._req, backend, mat))
     self.assertEquals('foo', output)
     self.assertEquals(HTTP_OK, self._status)
     self.assertContentTypeEquals('text/plain')
     self.assertFalse(self._req.cached)
Exemplo n.º 4
0
 def test_get_text_file(self):
     backend = _test_backend([], named_files={"description": "foo"})
     mat = re.search(".*", "description")
     output = "".join(get_text_file(self._req, backend, mat))
     self.assertEquals("foo", output)
     self.assertEquals(HTTP_OK, self._status)
     self.assertContentTypeEquals("text/plain")
     self.assertFalse(self._req.cached)