Beispiel #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()
Beispiel #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()
Beispiel #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()
Beispiel #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)
Beispiel #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)
Beispiel #6
0
 def test_init_without_core_controller(self):
     """
     """
     with self.assertRaises(RuntimeError):
         GAController(core_controller=None)
Beispiel #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()