Exemple #1
0
 def test_constant_returns_constant_with_default_cookie_value(self):
     response = Response.constant(self.dummy_value)
     self.assertEqual(None, response.cookie())
Exemple #2
0
 def test_constant_returns_constant_resource_with_cookie_provided(self):
     response = Response.constant(self.dummy_value,
                                  cookie=self.dummy_cookie)
     self.assertEqual(self.dummy_cookie, response.cookie())
Exemple #3
0
 def test_constant_returns_constant_resource_with_constant_name(self):
     response = Response.constant(self.dummy_value)
     self.assertEqual('Constant', response.resource_name())
Exemple #4
0
 def test_constant_returns_constant_resource_with_default_status(self):
     response = Response.constant(self.dummy_value)
     self.assertEqual(200, response.status())
Exemple #5
0
 def test_constant_returns_constant_resource_with_status_provided(self):
     response = Response.constant(self.dummy_value, status=732)
     self.assertEqual(732, response.status())
Exemple #6
0
 def test_constant_returns_constant_resource(self):
     response = Response.constant(self.dummy_value)
     self.assertEqual(self.dummy_value, response.as_json())