def test_same_value_same_id_empty(self): """ Test that two SimpleProperty objects with the same name have the same identifier() """ do = DataObject(ident=R.URIRef("http://example.org")) do1 = DataObject(ident=R.URIRef("http://example.org")) c = DataObject.DatatypeProperty("boots", do) c1 = DataObject.DatatypeProperty("boots", do1) self.assertEqual(c.identifier(), c1.identifier())
def test_diff_prop_same_name_same_object_same_value_same_id(self): """ Test that two SimpleProperty with the same name have the same identifier """ # why would you ever do this? do = DataObject(ident=R.URIRef("http://example.org")) c = DataObject.DatatypeProperty("boots", do) c1 = DataObject.DatatypeProperty("boots", do) c('join') c1('join') self.assertEqual(c.identifier(), c1.identifier())
def test_diff_value_diff_id_not_equal(self): """ Test that two SimpleProperty with the same name have the same identifier() """ do = DataObject(ident=R.URIRef("http://example.org")) do1 = DataObject(ident=R.URIRef("http://example.org")) c = DataObject.DatatypeProperty("boots", do) c1 = DataObject.DatatypeProperty("boots", do1) do.boots('join') do1.boots('partition') self.assertNotEqual(c.identifier(), c1.identifier())
def test_diff_prop_same_name_same_object_diff_value_diff_id(self): """ Test that two SimpleProperty with the same name, but different values have distinct identifiers """ # why would you ever do this? do = DataObject(ident=R.URIRef("http://example.org")) c = DataObject.DatatypeProperty("boots", do) c1 = DataObject.DatatypeProperty("boots", do) c('partition') c1('join') self.assertNotEqual(c.identifier(), c1.identifier())
def test_diff_value_insert_order_same_id(self): """ Test that two SimpleProperty with the same name have the same identifier() """ do = DataObject(ident=R.URIRef("http://example.org")) do1 = DataObject(ident=R.URIRef("http://example.org")) c = DataObject.DatatypeProperty("boots", do, multiple=True) c1 = DataObject.DatatypeProperty("boots", do1, multiple=True) do.boots('join') do.boots('simile') do.boots('partition') do1.boots('partition') do1.boots('join') do1.boots('simile') self.assertEqual(c.identifier(), c1.identifier())