# 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):


    import unittest2 as unittest
    import unittest
import pytest
from tests import testlib
from __future__ import absolute_import
from __future__ import print_function
try:
except ImportError:


@pytest.mark.smoke
class ModularInputKindTestCase(testlib.SDKTestCase):
    def setUp(self):
        super(ModularInputKindTestCase, self).setUp()
        self.uncheckedRestartSplunk()

    @pytest.mark.app
    def test_lists_modular_inputs(self):
        # Install modular inputs to list, and restart
        # so they'll show up.
        self.install_app_from_collection("modular_inputs")
        self.uncheckedRestartSplunk()

        inputs = self.service.inputs
        if ('abcd','test2') not in inputs:
            inputs.create('abcd', 'test2', field1='boris')

        input = inputs['abcd', 'test2']
        self.assertEqual(input.field1, 'boris')
        for m in self.service.modular_input_kinds:
            self.check_modular_input_kind(m)

    def check_modular_input_kind(self, m):
        print(m.name)

# 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.py
    import unittest2 as unittest
    import unittest
import pytest
from tests import testlib

from __future__ import absolute_import
from __future__ import print_function
try:
except ImportError:


@pytest.mark.smoke
class ModularInputKindTestCase(testlib.SDKTestCase):
    def setUp(self):
        super(ModularInputKindTestCase, self).setUp()
        self.uncheckedRestartSplunk()

    @pytest.mark.app
    def test_lists_modular_inputs(self):
        # Install modular inputs to list, and restart
        # so they'll show up.
        self.install_app_from_collection("modular_inputs")
        self.uncheckedRestartSplunk()

        inputs = self.service.inputs
        if ('abcd','test2') not in inputs:
            inputs.create('abcd', 'test2', field1='boris')

        input = inputs['abcd', 'test2']
        self.assertEqual(input.field1, 'boris')
        for m in self.service.modular_input_kinds:
            self.check_modular_input_kind(m)

    def check_modular_input_kind(self, m):
        print(m.name)

        if m.name == 'test1':