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