예제 #1
0
 def test_util_check_statement(self):
     c = "http://example.com"
     self.assertRaises(SubjectTypeError, util.check_statement, (c, self.p, self.o))
     self.assertRaises(PredicateTypeError, util.check_statement, (self.s, c, self.o))
     self.assertRaises(ObjectTypeError, util.check_statement, (self.s, self.p, c))
     res = util.check_statement((self.s, self.p, self.o))
     self.assertTrue(res == None)
예제 #2
0
 def test_util_check_statement(self):
     c = "http://example.com"
     self.assertRaises(
         SubjectTypeError, 
             util.check_statement, 
                 (c, self.p, self.o)) 
     self.assertRaises(
         PredicateTypeError, 
             util.check_statement, 
                 (self.s, c, self.o)) 
     self.assertRaises(
         ObjectTypeError, 
             util.check_statement, 
                 (self.s, self.p, c)) 
     res = util.check_statement((self.s, self.p, self.o))
     self.assert_(res == None)