Beispiel #1
0
 def test_status(self):
     self.assertEqual(
         fwx.RedirectResponse('/location', permanent=True).status,
         308,
     )
     self.assertEqual(
         fwx.RedirectResponse('/location', permanent=False).status,
         307,
     )
Beispiel #2
0
 def test_permanent_defaults_to_true(self):
     response = fwx.RedirectResponse('/location')
     self.assertEqual(response.permanent, True)
Beispiel #3
0
 def test_takes_location_as_keyword_argument(self):
     response = fwx.RedirectResponse(location='/location')
     self.assertEqual(response.location, '/location')
Beispiel #4
0
 def test_takes_location_as_positional_argument(self):
     response = fwx.RedirectResponse('/location')
     self.assertEqual(response.location, '/location')
Beispiel #5
0
 def test_content(self):
     self.assertEqual(
         fwx.RedirectResponse('/location').content,
         (b'',),
     )
Beispiel #6
0
 def test_headers(self):
     self.assertEqual(
         fwx.RedirectResponse('/location').headers,
         (('Location','/location'),),
     )