diff options
author | Dolph Mathews <dolph.mathews@gmail.com> | 2014-08-20 15:18:22 -0500 |
---|---|---|
committer | Dolph Mathews <dolph.mathews@gmail.com> | 2014-08-20 21:29:06 -0500 |
commit | 52727bcea3a98e72331e748ce5f9e3a111a64cd1 (patch) | |
tree | 4e88066fc188325f9e21ce30ea21285f262bd373 /pycadf/tests | |
parent | 9c400a7da08d14562a616357a220daa5b5df852d (diff) | |
download | pycadf-52727bcea3a98e72331e748ce5f9e3a111a64cd1.tar.gz |
add federated credential0.6.0
This is in support of bp audit-support-for-federation in Keystone.
Change-Id: Ibba203b4131a46fcfd7cc1e54b480b9c1392fe83
Closes-Bug: 1359495
Diffstat (limited to 'pycadf/tests')
-rw-r--r-- | pycadf/tests/test_cadf_spec.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pycadf/tests/test_cadf_spec.py b/pycadf/tests/test_cadf_spec.py index 68761a4..577f429 100644 --- a/pycadf/tests/test_cadf_spec.py +++ b/pycadf/tests/test_cadf_spec.py @@ -59,6 +59,21 @@ class TestCADFSpec(base.TestCase): for key in credential.CRED_KEYNAMES: self.assertIn(key, dict_cred) + def test_federated_credential(self): + cred = credential.FederatedCredential( + token=identifier.generate_uuid(), + type='http://docs.oasis-open.org/security/saml/v2.0', + identity_provider=identifier.generate_uuid(), + user=identifier.generate_uuid(), + groups=[ + identifier.generate_uuid(), + identifier.generate_uuid(), + identifier.generate_uuid()]) + self.assertEqual(cred.is_valid(), True) + dict_cred = cred.as_dict() + for key in credential.FED_CRED_KEYNAMES: + self.assertIn(key, dict_cred) + def test_geolocation(self): geo = geolocation.Geolocation(id=identifier.generate_uuid(), latitude='43.6481 N', |