Ejemplo n.º 1
0
 def test_generate_json_response_is_returned(self,
                                             mock_generate_json_response):
     returned_obj = page_not_found(mock.Mock())
     mock_generate_json_response.assert_called_once_with()
     self.assertTrue(
         returned_obj is mock_generate_json_response.return_value)
Ejemplo n.º 2
0
 def test_generate_json_response_is_returned(self, mock_generate_json_response):
     returned_obj = page_not_found(mock.Mock())
     mock_generate_json_response.assert_called_once_with()
     self.assertTrue(returned_obj is mock_generate_json_response.return_value)
Ejemplo n.º 3
0
 def test_status_code_is_set(self, mock_generate_json_response):
     returned_obj = page_not_found(mock.Mock())
     self.assertEqual(returned_obj.status_code, httplib.NOT_FOUND)
Ejemplo n.º 4
0
 def test_status_code_is_set(self, mock_generate_json_response):
     returned_obj = page_not_found(mock.Mock())
     self.assertEqual(returned_obj.status_code, httplib.NOT_FOUND)