providers/saml: fix managed mappings not being set on import
This commit is contained in:
parent
0ade57b5a6
commit
61772b75ff
|
@ -74,7 +74,7 @@ class ServiceProviderMetadata:
|
||||||
# Set all auto-generated Property-mappings as defaults
|
# Set all auto-generated Property-mappings as defaults
|
||||||
# They should provide a sane default for most applications:
|
# They should provide a sane default for most applications:
|
||||||
provider.property_mappings.set(
|
provider.property_mappings.set(
|
||||||
SAMLPropertyMapping.objects.filter(name__startswith="Autogenerated")
|
SAMLPropertyMapping.objects.exclude(managed__isnull=True)
|
||||||
)
|
)
|
||||||
provider.save()
|
provider.save()
|
||||||
return provider
|
return provider
|
||||||
|
|
|
@ -78,7 +78,7 @@ class TestServiceProviderMetadataParser(TestCase):
|
||||||
self.assertEqual(provider.sp_binding, SAMLBindings.POST)
|
self.assertEqual(provider.sp_binding, SAMLBindings.POST)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
len(provider.property_mappings.all()),
|
len(provider.property_mappings.all()),
|
||||||
len(SAMLPropertyMapping.objects.filter(name__startswith="Autogenerated")),
|
len(SAMLPropertyMapping.objects.exclude(managed__isnull=True)),
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_with_signing_cert(self):
|
def test_with_signing_cert(self):
|
||||||
|
|
Reference in New Issue