# Path: ecs_scheduler/triggers.py
# def init():
# def get(trigger_name):
#     def determine_task_count(self, job_data):
#     def __init__(self):
#     def determine_task_count(self, job_data):
#     def _calculate_task_count(self, message_count, job_data):
# class NoOpTrigger:
# class SqsTrigger:


import unittest
from unittest.mock import patch, Mock
from ecs_scheduler.triggers import (
    NoOpTrigger, SqsTrigger, get, init, _triggers
)

        self.assertEqual(0, count)

    def test_determine_task_count_returns_task_count_if_no_scaling_factor(
        self
    ):
        test_data = {'taskCount': 10, 'trigger': {'queueName': 'testQueue'}}
        fake_queue = Mock(attributes={'ApproximateNumberOfMessages': 1})
        self._trigger._sqs.get_queue_by_name.return_value = fake_queue

        count = self._trigger.determine_task_count(test_data)

        self.assertEqual(10, count)

    def test_determine_task_count_returns_max_count_if_no_scaling_factor_and_task_greater_than_max(self):
        test_data = {
            'taskCount': 10,
            'trigger': {'queueName': 'testQueue'},
            'maxCount': 7,
        }
        fake_queue = Mock(attributes={'ApproximateNumberOfMessages': 1})
        self._trigger._sqs.get_queue_by_name.return_value = fake_queue

        count = self._trigger.determine_task_count(test_data)

        self.assertEqual(7, count)

    def test_determine_task_count_returns_calculated_count_based_on_factor(
        self
    ):

# Path: ecs_scheduler/triggers.py
# def init():
# def get(trigger_name):
#     def determine_task_count(self, job_data):
#     def __init__(self):
#     def determine_task_count(self, job_data):
#     def _calculate_task_count(self, message_count, job_data):
# class NoOpTrigger:
# class SqsTrigger:


# Path: test/test_triggers.py
import unittest
from unittest.mock import patch, Mock
from ecs_scheduler.triggers import (
    NoOpTrigger, SqsTrigger, get, init, _triggers
)


        self.assertEqual(0, count)

    def test_determine_task_count_returns_task_count_if_no_scaling_factor(
        self
    ):
        test_data = {'taskCount': 10, 'trigger': {'queueName': 'testQueue'}}
        fake_queue = Mock(attributes={'ApproximateNumberOfMessages': 1})
        self._trigger._sqs.get_queue_by_name.return_value = fake_queue

        count = self._trigger.determine_task_count(test_data)

        self.assertEqual(10, count)

    def test_determine_task_count_returns_max_count_if_no_scaling_factor_and_task_greater_than_max(self):
        test_data = {
            'taskCount': 10,
            'trigger': {'queueName': 'testQueue'},
            'maxCount': 7,
        }
        fake_queue = Mock(attributes={'ApproximateNumberOfMessages': 1})
        self._trigger._sqs.get_queue_by_name.return_value = fake_queue

        count = self._trigger.determine_task_count(test_data)

        self.assertEqual(7, count)

    def test_determine_task_count_returns_calculated_count_based_on_factor(
        self
    ):

        test_data = {