예제 #1
0
 def test_constant_returns_constant_with_default_cookie_value(self):
     response = Response.constant(self.dummy_value)
     self.assertEqual(None, response.cookie())
예제 #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())
예제 #3
0
 def test_constant_returns_constant_resource_with_constant_name(self):
     response = Response.constant(self.dummy_value)
     self.assertEqual('Constant', response.resource_name())
예제 #4
0
 def test_constant_returns_constant_resource_with_default_status(self):
     response = Response.constant(self.dummy_value)
     self.assertEqual(200, response.status())
예제 #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())
예제 #6
0
 def test_constant_returns_constant_resource(self):
     response = Response.constant(self.dummy_value)
     self.assertEqual(self.dummy_value, response.as_json())