def test_ssl_termination_policy_api_set2(self, mock_put):
        '''
            Tests when requests gets a 500 response from forum
        '''
        test_name = sys._getframe().f_code.co_name

        model = SslTerminationPolicy(key_pair="bill")  # noqa: E501
        model.name = "bill"
        mock_resp = helper._mock_response(status=500,
                                          raise_for_status="internal error")
        mock_put.return_value = mock_resp

        with self.assertRaises(ForumHTTPError) as e:
            created = self._api.set("bill", model)

    #print e.exception.message
        self.assertEqual(500, e.exception.cause.response.status_code)
        self.assertIn('internal error', e.exception.message)
    def test_ssl_termination_policy_api_set1(self, mock_put):
        '''
            Tests when requests gets a successful response from forum
        '''
        test_name = sys._getframe().f_code.co_name

        #mock_get.return_value  = self.loadMock(test_name)
        mock_resp = helper._mock_response(test_name=test_name)
        mock_put.return_value = mock_resp

        model = SslTerminationPolicy(key_pair=test_name)  # noqa: E501
        model.name = test_name
        model.authenticate_client = False
        model.enabled_protocols = ['TLSv1.2', 'TLSv1.1']
        model.associate_dn_to_user = False
        model.use_user_attr_only = False

        created = self._api.set(test_name, model)

        self.assertIsInstance(created, SslTerminationPolicy)
        self.assertEqual(created, model)
        self.assertEqual(created.name, test_name)