Пример #1
0
    def test_start_scheduler(self, sqs, dynamo, repeat, tables,
                             get_instance_id):
        get_instance_id.return_value = 'i-123456'

        start_scheduler(ENVIRONMENT, DOMAIN, REGIONS, 0.1, 0.1, 0.1)

        self.assertEquals(4, repeat.call_count)
Пример #2
0
    def test_start_scheduler_without_messaging(self, sqs, dynamo, get_queue,
                                               repeat, tables,
                                               get_instance_id):
        get_queue.return_value = None

        start_scheduler(ENVIRONMENT, DOMAIN, REGIONS, 0.1, 0.1, 0.1)

        self.assertEquals(3, repeat.call_count)
Пример #3
0
    def test_start_scheduler_multiregion(self, sqs, dynamo, repeat, tables,
                                         get_instance_id):
        get_instance_id.return_value = 'i-123456'

        start_scheduler(ENVIRONMENT, DOMAIN, ['us-east-1', 'us-west-2'], 0.1,
                        0.1, 0.1)

        self.assertEquals(8, repeat.call_count)