Ejemplo n.º 1
0
    def test_shutdown(self):
        """
        Test shutdown
        """
        sickbeard.PID = 123456
        sickbeard.events = Events(None)

        test_cases = {
            0: False,
            '0': False,
            123: False,
            '123': False,
            123456: True,
            '123456': True,
        }

        unicode_test_cases = {
            u'0': False,
            u'123': False,
            u'123456': True,
        }

        for tests in test_cases, unicode_test_cases:
            for (pid, result) in tests.iteritems():
                self.assertEqual(Shutdown.stop(pid), result)
Ejemplo n.º 2
0
    def test_shutdown(self):
        """
        Test shutdown
        """
        sickbeard.PID = 123456
        sickbeard.events = Events(None)

        test_cases = {
            0: False,
            '0': False,
            123: False,
            '123': False,
            123456: True,
            '123456': True,
        }

        unicode_test_cases = {
            u'0': False,
            u'123': False,
            u'123456': True,
        }

        for tests in test_cases, unicode_test_cases:
            for (pid, result) in tests.iteritems():
                self.assertEqual(Shutdown.stop(pid), result)
Ejemplo n.º 3
0
    def test_shutdown(self):
        sickbeard.PID = 123456
        sickbeard.events = Events(None)

        tests = {
            0: False,
            '0': False,
            u'0': False,
            123: False,
            '123': False,
            u'123': False,
            123456: True,
            '123456': True,
            u'123456': True,
        }

        for (pid, result) in tests.iteritems():
            self.assertEqual(Shutdown.stop(pid), result)
Ejemplo n.º 4
0
    def test_shutdown(self):
        sickbeard.PID = 123456
        sickbeard.events = Events(None)

        tests = {
            0: False,
            '0': False,
            u'0': False,
            123: False,
            '123': False,
            u'123': False,
            123456: True,
            '123456': True,
            u'123456': True,
        }

        for (pid, result) in tests.iteritems():
            self.assertEqual(Shutdown.stop(pid), result)