tests/test_bleach_field.py
def _validate(non_bleached_value, bleached_value):
        """Validates whether the specified non-bleached value ended up being
        correctly bleached.

        Arguments:
            non_bleached_value:
                The value before bleaching.

            bleached_value:
                The value after bleaching.
        """

        for lang_code, _ in settings.LANGUAGES:
            if not non_bleached_value.get(lang_code):
                assert not bleached_value.get(lang_code)
                continue

            expected_value = bleach.clean(
                non_bleached_value.get(lang_code), get_bleach_default_options()
            )

            assert bleached_value.get(lang_code) == expected_value
Validates whether the specified non-bleached value ended up being
        correctly bleached.

        Arguments:
            non_bleached_value:
                The value before bleaching.

            bleached_value:
                The value after bleaching.
        
Validates whether the specified non-bleached value ended up being
correctly bleached.
Validates whether the specified non - bleached value ended up being correctly bleached .
def _validate(non_bleached_value, bleached_value):
        for lang_code, _ in settings.LANGUAGES:
            if not non_bleached_value.get(lang_code):
                assert not bleached_value.get(lang_code)
                continue
            expected_value = bleach.clean(
                non_bleached_value.get(lang_code), get_bleach_default_options()
            )
            assert bleached_value.get(lang_code) == expected_value
def _validate ( non_bleached_value , bleached_value ) : for lang_code , _ in settings . LANGUAGES : if not non_bleached_value . get ( lang_code ) : assert not bleached_value . get ( lang_code ) continue expected_value = bleach . clean ( non_bleached_value . get ( lang_code ) , get_bleach_default_options ( ) ) assert bleached_value . get ( lang_code ) == expected_value
Validates whether the specified non-bleached value ended up being
correctly bleached.
Validates whether the specified non - bleached value ended up being correctly bleached .
"""Validates whether the specified non-bleached value ended up being
        correctly bleached.

        Arguments:
            non_bleached_value:
                The value before bleaching.

            bleached_value:
                The value after bleaching.
        """
non_bleached_value
The value before bleaching.
The value before bleaching .
bleached_value
The value after bleaching.
The value after bleaching .