Esempio n. 1
0
	def test_main_delete(self, mock_prepare_inputs, mock_module, mock_delete, mock_exit_json, mock_get_response):

		mock_prepare_inputs.return_value = (mock_kong_admin_url, {}, "absent")
		mock_get_response.return_value = (True, {})
		main()

		assert mock_delete.called	
Esempio n. 2
0
    def test_main_add(self, mock_prepare_inputs, mock_module, mock_list,
                      mock_exit_json, mock_get_response):
        mock_prepare_inputs.return_value = (mock_kong_admin_url, {}, "list")
        mock_get_response.return_value = (True, {})
        main()

        assert mock_list.called
Esempio n. 3
0
	def test_main_add(self, mock_prepare_inputs, mock_module, mock_list, mock_exit_json, mock_get_response):

		mock_prepare_inputs.return_value = (mock_kong_admin_url, {}, "list")
		mock_get_response.return_value = (True, {})
		main()

		assert mock_list.called			
Esempio n. 4
0
    def test_main_delete(self, mock_prepare_inputs, mock_module, mock_delete,
                         mock_exit_json, mock_get_response):
        mock_prepare_inputs.return_value = (mock_kong_admin_url, {}, "absent")
        mock_get_response.return_value = (True, {})
        main()

        assert mock_delete.called