def test_entity_filters(self):
        filters = (
            'missing',
            'fuzzy',
            'suggested',
            'translated',
            'untranslated',
            'has-suggestions',
            'unchanged',
        )
        for filter_ in filters:
            filter_name = filter_.replace('-', '_')
            with patch('pontoon.base.models.Entity.objects.{}'.format(filter_name), return_value=Entity.objects.all()) as filter_mock:
                self.client.post('/get-entities/', {
                    'project': self.resource.project.slug,
                    'locale': self.locale.code,
                    'paths[]': [self.resource.path],
                    'filter': filter_,
                    'limit': 1,
                }, HTTP_X_REQUESTED_WITH='XMLHttpRequest')
                assert_true(filter_mock.called)
                assert_equal(filter_mock.call_args, call(self.locale))
Tests if right filter calls right method in the Entity manager.
dataset/ETHPy150Open mozilla/pontoon/pontoon/base/tests/test_views.py/EntityViewTests.test_entity_filters