예제 #1
0
파일: test_store.py 프로젝트: Razumain/pyFF
 def test_lookup_intersect_empty_test01(self):
     store = MemoryStore()
     store.update(self.test01)
     entity_id = root(self.test01).get('entityID')
     e = store.lookup("%s=%s+%s=%s" % (ATTRS['domain'], 'example.com', ATTRS['role'], 'sp'))
     print e
     assert (len(e) == 0)
예제 #2
0
파일: test_store.py 프로젝트: skoranda/pyFF
 def test_lookup_intersect_empty_test01(self):
     store = MemoryStore()
     store.update(self.test01)
     entity_id = root(self.test01).get('entityID')
     e = store.lookup("%s=%s+%s=%s" %
                      (ATTRS['domain'], 'example.com', ATTRS['role'], 'sp'))
     assert (len(e) == 0)
예제 #3
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
예제 #4
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
예제 #5
0
파일: test_store.py 프로젝트: Razumain/pyFF
 def test_lookup_test01(self):
     store = MemoryStore()
     store.update(self.test01)
     entity_id = root(self.test01).get('entityID')
     e = store.lookup(entity_id)
     assert (len(e) == 1)
     assert (e[0] is not None)
     assert (e[0].get('entityID') is not None)
     assert (e[0].get('entityID') == entity_id)
예제 #6
0
파일: test_store.py 프로젝트: skoranda/pyFF
 def test_lookup_test01(self):
     store = MemoryStore()
     store.update(self.test01)
     entity_id = root(self.test01).get('entityID')
     e = store.lookup(entity_id)
     assert (len(e) == 1)
     assert (e[0] is not None)
     assert (e[0].get('entityID') is not None)
     assert (e[0].get('entityID') == entity_id)
예제 #7
0
 def test_lookup_intersect_test01(self):
     store = MemoryStore()
     store.update(self.test01)
     entity_id = root(self.test01).get('entityID')
     e = store.lookup("%s=%s+%s=%s" % (ATTRS['domain'], 'example.com', ATTRS['role'], 'idp'))
     assert (len(e) == 1)
     assert (e[0] is not None)
     assert (e[0].get('entityID') is not None)
     assert (e[0].get('entityID') == entity_id)
예제 #8
0
파일: test_store.py 프로젝트: Razumain/pyFF
 def test_lookup_intersect_test01(self):
     store = MemoryStore()
     store.update(self.test01)
     entity_id = root(self.test01).get('entityID')
     e = store.lookup("%s=%s+%s=%s" % (ATTRS['domain'], 'example.com', ATTRS['role'], 'idp'))
     print e
     assert (len(e) == 1)
     assert (e[0] is not None)
     assert (e[0].get('entityID') is not None)
     assert (e[0].get('entityID') == entity_id)