def METHOD_NAME(
    app_test_generator,
    fixture,
    called_function,
    test_generator,
    generator_args,
    generator_kwargs,
    expected_tests,
    dedup_call_count,
):
    atg = AppTestGenerator(test_config)
    setattr(getattr(atg, called_function).generate_tests, "side_effect", test_generator)
    with patch.object(
        AppTestGenerator, "dedup_tests", side_effect=lambda x, y: x
    ) as dedup_mock:
        out = list(atg.generate_tests(fixture))
        assert out == expected_tests
        getattr(atg, called_function).generate_tests.assert_called_once_with(
            *generator_args, **generator_kwargs
        )
        assert dedup_mock.call_count == dedup_call_count