def setUp(self): resultfile = os.path.join(testdir, siaresultfile) self.tbl = votableparse(resultfile) self.result = sia.SIAResults(self.tbl) self.rec = self.result.getrecord(0) self.cleanfiles()
def setUp(self): resultfile = get_pkg_data_filename(ssaresultfile) self.tbl = votableparse(resultfile) self.result = ssa.SSAResults(self.tbl) self.rec = self.result.getrecord(0) self.outdir = tempfile.mkdtemp()
def testErrorResourceInfo(self): resultfile = get_pkg_data_filename("data/error3-cs.xml") self.tbl = votableparse(resultfile) try: res = cs.SCSResults(self.tbl) self.fail("Failed to detect error response") except dalq.DALQueryError as ex: self.assertEquals(ex.label, "Error") self.assertEquals(ex.reason, "Forced Fail")
def testErrorResourceInfo(self): resultfile = os.path.join(testdir, "error3-cs.xml") self.tbl = votableparse(resultfile) try: res = cs.SCSResults(self.tbl) self.fail("Failed to detect error response") except dalq.DALQueryError, ex: self.assertEquals(ex.label, "Error") self.assertEquals(ex.reason, "Forced Fail")
def testErrorParam(self): resultfile = os.path.join(testdir, "error2-cs.xml") self.tbl = votableparse(resultfile) try: res = cs.SCSResults(self.tbl) self.fail("Failed to detect error response") except dalq.DALQueryError, ex: self.assertEquals(ex.label, "Error") self.assertEquals(ex.reason, "DEC parameter out-of-range")
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 testErrorParam(self): resultfile = get_pkg_data_filename("data/error2-cs.xml") self.tbl = votableparse(resultfile) try: res = cs.SCSResults(self.tbl) self.fail("Failed to detect error response") except dalq.DALQueryError as ex: self.assertEquals(ex.label, "Error") # Note: because it is stored in a PARAM and the datatype is "char", # the value will come out as bytes (rather than unicode) self.assertEquals(ex.reason, b"DEC parameter out-of-range")
def setUp(self): resultfile = os.path.join(testdir, errresultfile) self.tbl = votableparse(resultfile)
def setUp(self): resultfile = get_pkg_data_filename(slaresultfile) self.tbl = votableparse(resultfile) self.result = sla.SLAResults(self.tbl) self.rec = self.result.getrecord(0)
def setUp(self): resultfile = get_pkg_data_filename(errresultfile) self.tbl = votableparse(resultfile)
def setUp(self): resultfile = os.path.join(testdir, siaresultfile) self.tbl = votableparse(resultfile) self.result = dalq.DALResults(self.tbl) self.rec = self.result.getrecord(0)
def setUp(self): resultfile = get_pkg_data_filename(csresultfile) self.tbl = votableparse(resultfile) self.result = cs.SCSResults(self.tbl) self.rec = self.result.getrecord(0)
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)
def setUp(self): # load a canned result file resultfile = get_pkg_data_filename(regresultfile) self.tbl = votableparse(resultfile)
def setUp(self): resultfile = get_pkg_data_filename(regresultfile) self.tbl = votableparse(resultfile) self.result = reg.RegistryResults(self.tbl) self.setrec(0)
def setUp(self): resultfile = os.path.join(testdir, regresultfile) self.tbl = votableparse(resultfile) self.result = reg.RegistryResults(self.tbl) self.setrec(0)
def setUp(self): resultfile = get_pkg_data_filename(siaresultfile) self.tbl = votableparse(resultfile) self.result = sia.SIAResults(self.tbl) self.rec = self.result.getrecord(0)
def setUp(self): resultfile = os.path.join(testdir, csresultfile) self.tbl = votableparse(resultfile) self.result = cs.SCSResults(self.tbl) self.rec = self.result.getrecord(0)
def setUp(self): # load a canned result file resultfile = os.path.join(testdir, regresultfile) self.tbl = votableparse(resultfile)
def setUp(self): resultfile = os.path.join(testdir, slaresultfile) self.tbl = votableparse(resultfile) self.result = sla.SLAResults(self.tbl) self.rec = self.result.getrecord(0)