class SubscriptionQuerySetTest(TestCase):
    """
    Test the subscription query set class
    """

    def setUp(self):
        # Call super
        super(SubscriptionQuerySetTest, self).setUp()

        # Create a query set to use
        self.queryset = SubscriptionQuerySet()

    @patch.object(SubscriptionQuerySet, 'select_related', autospec=True)
    def test_cache_related(self, mock_select_related):
        # Call the method
        self.queryset.cache_related()

        # Assert that we called select related with the correct args
        mock_select_related.assert_called_once_with(
            self.queryset,
            'medium',
            'source',
            'entity',
            'sub_entity_kind'
        )
class SubscriptionQuerySetTest(TestCase):
    """
    Test the subscription query set class
    """
    def setUp(self):
        # Call super
        super(SubscriptionQuerySetTest, self).setUp()

        # Create a query set to use
        self.queryset = SubscriptionQuerySet()

    @patch.object(SubscriptionQuerySet, 'select_related', autospec=True)
    def test_cache_related(self, mock_select_related):
        # Call the method
        self.queryset.cache_related()

        # Assert that we called select related with the correct args
        mock_select_related.assert_called_once_with(self.queryset, 'medium',
                                                    'source', 'entity',
                                                    'sub_entity_kind')
    def setUp(self):
        # Call super
        super(SubscriptionQuerySetTest, self).setUp()

        # Create a query set to use
        self.queryset = SubscriptionQuerySet()
    def setUp(self):
        # Call super
        super(SubscriptionQuerySetTest, self).setUp()

        # Create a query set to use
        self.queryset = SubscriptionQuerySet()