Exemple #1
0
 def test_get_metadata(self):
     reg = InMemoryServiceRegistry()
     server = mock.Mock()
     reg.register(SecondaryService(service_metadata=dummy_service_metadata, host='oeo.net', port=5678, server=server))
     assert reg.get_metadata('s1234') == dummy_service_metadata
     assert reg.get_metadata_all() == {'s1234': dummy_service_metadata}
Exemple #2
0
 def test_get_metadata(self):
     reg = InMemoryServiceRegistry()
     reg.persist(user_id='u9876', metadata=dummy_service_metadata, api_version="0.4.0")
     assert reg.get_metadata('u9876', 's1234') == dummy_service_metadata
     assert reg.get_metadata_all('u9876') == {'s1234': dummy_service_metadata}