Beispiel #1
0
 def test_throw_exception(self):
     """Test some exceptions."""
     c = foaf.Person()
     c.age = 20
Beispiel #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])
Beispiel #3
0
 def test_creation(self):
     """Test creation of objectes are possible."""
     c = foaf.Person()
     self.assertTrue(c.is_a(foaf.Person))
Beispiel #4
0
 def test_uid(self):
     """Test that the uid variable contains a UUID object."""
     c = foaf.Person()
     self.assertIsInstance(c.uid, uuid.UUID)
Beispiel #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))