# Path: tests/testlib.py
# class NoRestartRequiredError(Exception):
# class WaitTimedOutError(Exception):
# class SDKTestCase(unittest.TestCase):
# def to_bool(x):
# def tmpname():
# def wait(predicate, timeout=60, pause_time=0.5):
#     def assertEventuallyTrue(self, predicate, timeout=30, pause_time=0.5,
#                              timeout_message="Operation timed out."):
#     def check_content(self, entity, **kwargs):
#     def check_entity(self, entity):
#     def clear_restart_message(self):
#     def fake_splunk_version(self, version):
#     def install_app_from_collection(self, name):
#     def app_collection_installed(self):
#     def pathInApp(self, appName, pathComponents):
#     def uncheckedRestartSplunk(self, timeout=240):
#     def restartSplunk(self, timeout=240):
#     def setUpClass(cls):
#     def setUp(self):
#     def tearDown(self):


from tests import testlib
    import unittest
    import unittest2 as unittest
import splunklib.client as client
import pytest
        import unittest2 as unittest
        import unittest
    def test_list_arguments(self):
        self.install_app_from_collection("modular_inputs")

        if self.service.splunk_version[0] < 5:
            # Not implemented before 5.0
            return

        test1 = self.service.modular_input_kinds['test1']

        expected_args = set(["name", "resname", "key_id", "no_description", "empty_description",
                             "arg_required_on_edit", "not_required_on_edit", "required_on_create",
                            "not_required_on_create", "number_field", "string_field", "boolean_field"])
        found_args = set(test1.arguments.keys())

        self.assertEqual(expected_args, found_args)

    @pytest.mark.app
    def test_update_raises_exception(self):
        self.install_app_from_collection("modular_inputs")

        if self.service.splunk_version[0] < 5:
            # Not implemented before 5.0
            return

        test1 = self.service.modular_input_kinds['test1']
        self.assertRaises(client.IllegalOperationException, test1.update, a="b")

    def check_modular_input_kind(self, m):
        if m.name == 'test1':
            self.assertEqual('Test "Input" - 1', m['title'])

# Path: tests/testlib.py
# class NoRestartRequiredError(Exception):
# class WaitTimedOutError(Exception):
# class SDKTestCase(unittest.TestCase):
# def to_bool(x):
# def tmpname():
# def wait(predicate, timeout=60, pause_time=0.5):
#     def assertEventuallyTrue(self, predicate, timeout=30, pause_time=0.5,
#                              timeout_message="Operation timed out."):
#     def check_content(self, entity, **kwargs):
#     def check_entity(self, entity):
#     def clear_restart_message(self):
#     def fake_splunk_version(self, version):
#     def install_app_from_collection(self, name):
#     def app_collection_installed(self):
#     def pathInApp(self, appName, pathComponents):
#     def uncheckedRestartSplunk(self, timeout=240):
#     def restartSplunk(self, timeout=240):
#     def setUpClass(cls):
#     def setUp(self):
#     def tearDown(self):


# Path: tests/test_modular_input_kinds.py
from tests import testlib
    import unittest
    import unittest2 as unittest
import splunklib.client as client
import pytest
        import unittest2 as unittest
        import unittest

    def test_list_arguments(self):
        self.install_app_from_collection("modular_inputs")

        if self.service.splunk_version[0] < 5:
            # Not implemented before 5.0
            return

        test1 = self.service.modular_input_kinds['test1']

        expected_args = set(["name", "resname", "key_id", "no_description", "empty_description",
                             "arg_required_on_edit", "not_required_on_edit", "required_on_create",
                            "not_required_on_create", "number_field", "string_field", "boolean_field"])
        found_args = set(test1.arguments.keys())

        self.assertEqual(expected_args, found_args)

    @pytest.mark.app
    def test_update_raises_exception(self):
        self.install_app_from_collection("modular_inputs")

        if self.service.splunk_version[0] < 5:
            # Not implemented before 5.0
            return

        test1 = self.service.modular_input_kinds['test1']
        self.assertRaises(client.IllegalOperationException, test1.update, a="b")

    def check_modular_input_kind(self, m):
        if m.name == 'test1':
            self.assertEqual('Test "Input" - 1', m['title'])

            self.assertEqual("xml", m['streaming_mode'])