예제 #1
0
 def test_throw_exception(self):
     """Test some exceptions."""
     c = foaf.Person()
     c.age = 20
예제 #2
0
 def test_relations(self):
     """Test some relationships."""
     a = foaf.Person()
     b = foaf.Person()
     b.add(a, rel=foaf.knows)
     self.assertEqual(b.get(rel=foaf.knows), [a])
예제 #3
0
 def test_creation(self):
     """Test creation of objectes are possible."""
     c = foaf.Person()
     self.assertTrue(c.is_a(foaf.Person))
예제 #4
0
 def test_uid(self):
     """Test that the uid variable contains a UUID object."""
     c = foaf.Person()
     self.assertIsInstance(c.uid, uuid.UUID)
예제 #5
0
 def test_uid(self):
     """Test that the uid variable contains an uid."""
     c = foaf.Person()
     self.assertIsInstance(c.uid, (uuid.UUID, rdflib.URIRef))