def testCtorSimpleResource(self): import pyvo.registry.vao as reg regresultfile = \ get_pkg_data_filename("../../registry/tests/data/reg-short.xml") res = dalq.DALResults(votableparse(regresultfile)) # import pytest; pytest.set_trace() srv = dalq.DALService(self.baseurl, "sga", "3.0", reg.SimpleResource(res, 0)) self.assertTrue(len(srv.info.keys()) > 0) self.assertTrue(srv.info.get("title") is not None)
def testNoResmeta(self): srv = dalq.DALService(self.baseurl) self.assertEquals(srv.baseurl, self.baseurl) self.assert_(srv.info is not None) self.assert_(hasattr(srv.info, "get")) self.assertEquals(len(srv.info.keys()), 0)
def testCtor(self): self.res = {"title": "Archive", "shortName": "arch"} self.srv = dalq.DALService(self.baseurl, "sga", "2.0", self.res)