示例#1
0
 def testError(self):
     try:
         res = ssa.SSAResults(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")
示例#2
0
    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()
示例#3
0
 def testCtor(self):
     self.r = ssa.SSAResults(self.tbl)
     self.assertEquals(self.r.protocol, "ssa")
     self.assertEquals(self.r.version, "1.0")
     self.assert_(isinstance(self.r._fldnames, list))
     self.assert_(self.r.votable is not None)
     self.assertEquals(self.r.nrecs, 35)