summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRoland Hedberg <roland@catalogix.se>2016-09-22 08:31:38 +0300
committerGitHub <noreply@github.com>2016-09-22 08:31:38 +0300
commit146ff74ed0c6079bd7432f271c61779963a8f7e1 (patch)
tree85367e3f2c88ae49ef1da3fcca0e0532c99addea /tests
parentd7c2e34c0acfefb98eefdb8981caca6b51209b60 (diff)
parentc8d2705e47fe26eada9c197f26ba6468005521df (diff)
downloadpysaml2-146ff74ed0c6079bd7432f271c61779963a8f7e1.tar.gz
Merge pull request #357 from rebeckag/metadata-extension
Fix bug in MetadataStore.extension().
Diffstat (limited to 'tests')
-rw-r--r--tests/test_30_mdstore.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_30_mdstore.py b/tests/test_30_mdstore.py
index d4dd166a..aadd7726 100644
--- a/tests/test_30_mdstore.py
+++ b/tests/test_30_mdstore.py
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
import datetime
import re
+from collections import OrderedDict
from future.backports.urllib.parse import quote_plus
@@ -455,5 +456,16 @@ def test_metadata_extension_algsupport():
mdf = mds.metadata[full_path("uu.xml")]
assert mds
+
+def test_extension():
+ mds = MetadataStore(ATTRCONV, None)
+ # use ordered dict to force expected entity to be last
+ metadata = OrderedDict()
+ metadata["1"] = {"entity1": {}}
+ metadata["2"] = {"entity2": {"idpsso_descriptor": [{"extensions": {"extension_elements": [{"__class__": "test"}]}}]}}
+ mds.metadata = metadata
+ assert mds.extension("entity2", "idpsso_descriptor", "test")
+
+
if __name__ == "__main__":
test_metadata_extension_algsupport()