Exemplo 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	
Exemplo 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
Exemplo 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			
Exemplo 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