@@ -0,0 +1,2353 @@
+%22%22%22This test module checks that the API provided in the base.Manager%0Aclass is as expected.%0A%22%22%22%0A%0Afrom unittest import TestCase%0Afrom daeman.base import Manager%0Afrom inspect import getargspec%0A%0A%0Aclass CheckAPI(object):%0A    %22%22%22%0A    Ensure that the API is as expected.%0A%0A    Intended usage:%0A%0A    - Subclass %60TestCase%60 with a %60CheckAPI%60 mixin.%0A    - provide a %60setUp%60 method initializing:%0A      - self.keywords :: %5B(name (str), default value)%5D%0A      - self.argnames :: %5Bname (str)%5D%0A      - defaults :: %5B(value)%5D%0A    %22%22%22%0A%0A    def test_num_args(self):%0A        %22Test the number of function parameters%22%0A        self.assertEqual(len(self.argnames), len(self.keywords))%0A%0A    def test_arg_names_and_default(self):%0A        %22Make sure that the parameter names and default values match%22%0A        for i, (name, default) in enumerate(self.keywords):%0A            self.assertEqual(name, self.argnames%5Bi%5D)%0A            self.assertEqual(self.defaults%5Bi%5D, default)%0A%0A%0Aclass TestManagerInit(TestCase, CheckAPI):%0A    %22The constructor%22%0A    def setUp(self):%0A        self.keywords = %5B('pidfile', None),%0A                         ('logfile', None)%5D%0A        args, _, _, defaults = getargspec(Manager.__init__)%0A        self.argnames = args%5B1:%5D%0A        self.defaults = list(defaults)%0A%0A%0Aclass TestManagerStart(TestCase, CheckAPI):%0A    %22The 'start' method%22%0A    def setUp(self):%0A        self.keywords = %5B%5D%0A        args, _, _, defaults = getargspec(Manager.start)%0A        self.argnames = args%5B1:%5D%0A        self.assertIsNone(defaults)%0A        self.defaults = list()%0A%0A%0Aclass TestManagerStop(TestCase, CheckAPI):%0A    %22The 'stop' method%22%0A    def setUp(self):%0A        self.keywords = %5B%5D%0A        args, _, _, defaults = getargspec(Manager.stop)%0A        self.argnames = args%5B1:%5D%0A        self.assertIsNone(defaults)%0A        self.defaults = list()%0A%0A%0Aclass TestManagerStatus(TestCase, CheckAPI):%0A    %22The 'status' method%22%0A    def setUp(self):%0A        self.keywords = %5B%5D%0A        args, _, _, defaults = getargspec(Manager.status)%0A        self.argnames = args%5B1:%5D%0A        self.assertIsNone(defaults)%0A        self.defaults = list()%0A%0A%0Aclass TestManagerHealth(TestCase, CheckAPI):%0A    %22The 'health' method%22%0A    def setUp(self):%0A        self.keywords = %5B%5D%0A        args, _, _, defaults = getargspec(Manager.health)%0A        self.argnames = args%5B1:%5D%0A        self.assertIsNone(defaults)%0A        self.defaults = list()%0A

add initial tests