Ofcourse I can do that, but that will break most of the tests, since many tests rely on the format string. (ie). Also in future if you make decisions based on that string, it will break.
Better approach would be ( just a suggestion)
Add a method get_provider_name() and let it return "UUID" for UUID provider and "PKI" for PKI_PROVIDER. Then the code will become
if CONF.signing.token_format != configured_provider.get_provider_name()
raise exception
Ofcourse I can do that, but that will break most of the tests, since many tests rely on the format string. (ie). Also in future if you make decisions based on that string, it will break.
Better approach would be ( just a suggestion)
Add a method get_provider_name() and let it return "UUID" for UUID provider and "PKI" for PKI_PROVIDER. Then the code will become
if CONF.signing. token_format != configured_ provider. get_provider_ name()
raise exception