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