Exemplo n.º 1
0
Arquivo: unit.py Projeto: garethr/mnml
 def test_get_content(self):
     response = HttpResponse()
     self.assertEqual(response.get_content(), [b'', '\n'])
Exemplo n.º 2
0
Arquivo: unit.py Projeto: garethr/mnml
 def test_response_set_invalid_code(self):
     response = HttpResponse()
     response.set_status(900)
     self.assertEqual(response.get_status(), '500 Internal Server Error')
Exemplo n.º 3
0
Arquivo: unit.py Projeto: garethr/mnml
 def test_response_headers(self):
     response = HttpResponse()
     self.assertEqual(response.get_headers(), [('content-length', '0'), ('content-type', 'text/html'), ('Location', '/')])
Exemplo n.º 4
0
Arquivo: unit.py Projeto: pilif/mnml
 def test_response_headers(self):
     response = HttpResponse()
     self.assertEqual(response.get_headers(), [('content-length', '0'), ('content-type', 'text/html; charset=utf-8')])