def setUp(self): resultfile = get_pkg_data_filename(siaresultfile) self.tbl = votableparse(resultfile) self.result = dalq.DALResults(self.tbl) self.rec = self.result.getrecord(0) self.outdir = tempfile.mkdtemp()
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 testCtor(self): self.result = dalq.DALResults(self.tbl) self.assert_(isinstance(self.result._fldnames, list)) self.assert_(self.result.votable is not None) self.cursor = self.result.cursor()