def test_get_problems_filter_by_empty_params(self):
        params = [
            ({
                'name': ''
            }, []),
        ]

        for kwargs, expected_res in params:
            with self.subTest(kwargs=kwargs, expected_res=expected_res):
                res = DjangoGateway.get_problems(**kwargs)
                self.assertEqual(res, expected_res)
    def test_get_problems_filter_tags_all_and_name(self):
        res = DjangoGateway.get_problems(name_substr='e',
                                         tags_all=['tag1', 'tag2'])

        self.assertEqual(['name1', 'name2'], sorted([p.name for p in res]))
 def test_get_problems(self):
     problems = DjangoGateway.get_problems()
     self.assertEqual(2, len(problems))