Пример #1
0
    def test_identifier_must_be_implemented(self):
        """
        """
        controller = GAController(core_controller=GACoreController(garuda_uuid='test-garuda', redis_info={'host': '127.0.0.1', 'port': 6379, 'db': 6}))
        with self.assertRaises(NotImplementedError):
            controller.identifier()

        with self.assertRaises(NotImplementedError):
            controller.__class__.identifier()
Пример #2
0
 def test_start(self):
     """
     """
     controller = GAController(
         core_controller=GACoreController(garuda_uuid='test-garuda',
                                          redis_info={
                                              'host': '127.0.0.1',
                                              'port': 6379,
                                              'db': 6
                                          }))
     controller.start()
Пример #3
0
    def test_identifier_must_be_implemented(self):
        """
        """
        controller = GAController(
            core_controller=GACoreController(garuda_uuid='test-garuda',
                                             redis_info={
                                                 'host': '127.0.0.1',
                                                 'port': 6379,
                                                 'db': 6
                                             }))
        with self.assertRaises(NotImplementedError):
            controller.identifier()

        with self.assertRaises(NotImplementedError):
            controller.__class__.identifier()
Пример #4
0
    def test_uuid(self):
        """
        """
        controller = GAController(
            core_controller=GACoreController(garuda_uuid='test-garuda',
                                             redis_info={
                                                 'host': '127.0.0.1',
                                                 'port': 6379,
                                                 'db': 6
                                             }))

        self.assertIsNotNone(controller.uuid)
Пример #5
0
    def test_redis_informations(self):
        """
        """
        controller = GAController(
            core_controller=GACoreController(garuda_uuid='test-garuda',
                                             redis_info={
                                                 'host': '127.0.0.1',
                                                 'port': 6379,
                                                 'db': 6
                                             }))

        self.assertEquals(controller.subscriptions, {})
        self.assertEquals(controller.redis_host, '127.0.0.1')
        self.assertEquals(controller.redis_port, 6379)
        self.assertEquals(controller.redis_db, 6)
Пример #6
0
 def test_init_without_core_controller(self):
     """
     """
     with self.assertRaises(RuntimeError):
         GAController(core_controller=None)
Пример #7
0
 def test_stop(self):
     """
     """
     controller = GAController(core_controller=GACoreController(garuda_uuid='test-garuda', redis_info={'host': '127.0.0.1', 'port': 6379, 'db': 6}))
     controller.stop()