Exemplo n.º 1
0
    def test_SQSQueueClass_status(self):
        test_instance = queue.SQSQueue("ctx_node",
                                       resource_id='queue_id',
                                       client=self.fake_client,
                                       logger=None)

        self.assertEqual(test_instance.status, None)
Exemplo n.º 2
0
    def test_SQSQueueClass_properties(self):
        test_instance = queue.SQSQueue("ctx_node",
                                       resource_id='queue_id',
                                       client=self.fake_client,
                                       logger=None)

        self.assertEqual(test_instance.properties, None)

        self.fake_client.list_queues.assert_called_with(
            QueueNamePrefix='queue_id')
Exemplo n.º 3
0
    def test_SQSQueueClass_properties_list_queue(self):
        self.fake_client.list_queues = MagicMock(
            return_value={'QueueUrls': ['c']})

        test_instance = queue.SQSQueue("ctx_node",
                                       resource_id='queue_id',
                                       client=self.fake_client,
                                       logger=None)

        self.assertEqual(test_instance.properties, 'c')

        self.fake_client.list_queues.assert_called_with(
            QueueNamePrefix='queue_id')