# 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 logging
import splunklib.client as client
        import unittest2 as unittest
        import unittest
            'label': "SDK Test",
            'version': "1.2",
            'visible': True,
        }
        self.app.update(**kwargs)
        self.app.refresh()
        self.assertEqual(self.app['author'], "Me")
        self.assertEqual(self.app['label'], "SDK Test")
        self.assertEqual(self.app['version'], "1.2")
        self.assertEqual(self.app['visible'], "1")

    def test_delete(self):
        name = testlib.tmpname()
        app = self.service.apps.create(name)
        self.assertTrue(name in self.service.apps)
        self.service.apps.delete(name)
        self.assertFalse(name in self.service.apps)
        self.clear_restart_message() # We don't actually have to restart here.

    def test_package(self):
        p = self.app.package()
        self.assertEqual(p.name, self.app_name)
        self.assertTrue(p.path.endswith(self.app_name + '.spl'))
        # Assert string due to deprecation of this property in new Splunk versions
        self.assertIsInstance(p.url, str)

    def test_updateInfo(self):
        p = self.app.updateInfo()
        self.assertTrue(p is not None)


# 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_app.py
from tests import testlib
import logging
import splunklib.client as client
        import unittest2 as unittest
        import unittest

            'label': "SDK Test",
            'version': "1.2",
            'visible': True,
        }
        self.app.update(**kwargs)
        self.app.refresh()
        self.assertEqual(self.app['author'], "Me")
        self.assertEqual(self.app['label'], "SDK Test")
        self.assertEqual(self.app['version'], "1.2")
        self.assertEqual(self.app['visible'], "1")

    def test_delete(self):
        name = testlib.tmpname()
        app = self.service.apps.create(name)
        self.assertTrue(name in self.service.apps)
        self.service.apps.delete(name)
        self.assertFalse(name in self.service.apps)
        self.clear_restart_message() # We don't actually have to restart here.

    def test_package(self):
        p = self.app.package()
        self.assertEqual(p.name, self.app_name)
        self.assertTrue(p.path.endswith(self.app_name + '.spl'))
        # Assert string due to deprecation of this property in new Splunk versions
        self.assertIsInstance(p.url, str)

    def test_updateInfo(self):
        p = self.app.updateInfo()
        self.assertTrue(p is not None)


if __name__ == "__main__":