def unique_validator(self, key, column):
        if column.unique:
            return self.get_validator(
                'unique',
                column=getattr(self.model_class, key),
                get_session=self.form_class.get_session
            )
Test getting the serial number from a certificate
dataset/ETHPy150Open kvesteri/wtforms-alchemy/wtforms_alchemy/generator.py/FormGenerator.unique_validator--crossover with--dataset/ETHPy150Open saltstack/salt/tests/unit/modules/win_certutil_test.py/CertUtilTestCase.test_get_serial