Esempio n. 1
0
 def test_import_reset_wayf(self):
     store = MemoryStore()
     store.update(self.wayf,
                  tid='https://metadata.wayf.dk/wayf-edugain-metadata.xml')
     assert (store.size() == 77)
     store.reset()
     assert (store.size() == 0)
Esempio n. 2
0
 def test_create_store(self):
     store = MemoryStore()
     assert (store is not None)
     assert (store.size() == 0)
     assert (len(store.collections()) == 0)
     assert (str(store))
     assert (not store.attributes())
Esempio n. 3
0
 def test_create_store(self):
     store = MemoryStore()
     assert (store is not None)
     assert (store.size() == 0)
     assert (len(store.collections()) == 0)
     assert (str(store))
     assert (not store.attributes())
Esempio n. 4
0
 def test_select_wayf(self):
     store = MemoryStore()
     store.update(self.wayf, tid='https://metadata.wayf.dk/wayf-edugain-metadata.xml')
     assert store.size() == 77
     res = store.select("https://metadata.wayf.dk/wayf-edugain-metadata.xml")
     lst = [e.get('entityID') for e in res]
     assert len(lst) == 77
     assert 'https://birk.wayf.dk/birk.php/wayf.supportcenter.dk/its/saml2/idp/metadata.php?unit=its' in lst
Esempio n. 5
0
 def test_lookup_wayf_sha1(self):
     store = MemoryStore()
     store.update(self.wayf, tid='https://metadata.wayf.dk/wayf-edugain-metadata.xml')
     assert store.size() == 77
     res = store.lookup("{sha1}4ece490318a017bc2cc24674f5ad049ad562f7b2")
     lst = [e.get('entityID') for e in res]
     assert len(lst) == 1
     assert 'https://birk.wayf.dk/birk.php/wayf.supportcenter.dk/its/saml2/idp/metadata.php?unit=its' in lst
Esempio n. 6
0
 def test_lookup_wayf(self):
     store = MemoryStore()
     store.update(self.wayf,
                  tid='https://metadata.wayf.dk/wayf-edugain-metadata.xml')
     assert (store.size() == 77)
     res = store.lookup("entities")
     lst = [e.get('entityID') for e in res]
     assert (len(lst) == 77)
     assert (
         'https://birk.wayf.dk/birk.php/wayf.supportcenter.dk/its/saml2/idp/metadata.php?unit=its'
         in lst)
Esempio n. 7
0
 def test_import_reset_test01(self):
     store = MemoryStore()
     store.update(self.test01)
     assert (store.size() > 0)
     store.reset()
     assert (store.size() == 0)
Esempio n. 8
0
 def test_import_reset_test01(self):
     store = MemoryStore()
     store.update(self.test01)
     assert (store.size() > 0)
     store.reset()
     assert (store.size() == 0)