def test_openai_moderation(self):
        """Check that OpenAI moderation feedback functions produce a value in the
        0-1 range only. Only checks each feedback function once."""

        o = openai_provider.OpenAI()

        tests = get_openai_tests(o)
        funcs = set()

        for imp, args, _ in tests:
            # only one test per feedback function:
            if imp in funcs:
                continue
            funcs.add(imp)

            with self.subTest(f"{imp.__name__}-{args}"):
                actual = imp(**args)
                self.assertGreaterEqual(actual, 0.0)
                self.assertLessEqual(actual, 1.0)
Check that OpenAI moderation feedback functions produce a value in the
        0-1 range only. Only checks each feedback function once.
tests/e2e/test_providers.py