From 0598b9f6e8a37a42938f1db8648ff1b3355be519 Mon Sep 17 00:00:00 2001 From: mdorf Date: Thu, 21 Nov 2024 14:45:53 -0800 Subject: [PATCH] fixed failing unit tests as a result of modifying the test ontologies --- test/models/test_ontology.rb | 6 +++--- test/models/test_ontology_submission.rb | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/models/test_ontology.rb b/test/models/test_ontology.rb index 438f34d1..f0b4f3c6 100644 --- a/test/models/test_ontology.rb +++ b/test/models/test_ontology.rb @@ -153,7 +153,7 @@ def test_ontology_properties ont.bring(:submissions) sub = ont.submissions[0] props = ont.properties() - assert_equal 82, props.length + assert_equal 85, props.length # verify sorting assert_equal "http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#AlgorithmPurpose", props[0].id.to_s @@ -192,7 +192,7 @@ def test_ontology_properties # test property roots pr = ont.property_roots(sub, extra_include=[:hasChildren, :children]) - assert_equal 61, pr.length + assert_equal 64, pr.length # verify sorting assert_equal "http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#AlgorithmPurpose", pr[0].id.to_s @@ -206,7 +206,7 @@ def test_ontology_properties assert_equal 33, dpr.length # count annotation properties apr = pr.select { |p| p.class == LinkedData::Models::AnnotationProperty } - assert_equal 10, apr.length + assert_equal 13, apr.length # check for non-root properties assert_empty pr.select { |p| ["http://www.w3.org/2004/02/skos/core#broaderTransitive", "http://www.w3.org/2004/02/skos/core#topConceptOf", diff --git a/test/models/test_ontology_submission.rb b/test/models/test_ontology_submission.rb index ccf33359..a233c74e 100644 --- a/test/models/test_ontology_submission.rb +++ b/test/models/test_ontology_submission.rb @@ -448,7 +448,7 @@ def test_index_properties "./test/data/ontology_files/BRO_v3.5.owl", 1, process_rdf: true, extract_metadata: false, index_properties: true) res = LinkedData::Models::Class.search("*:*", {:fq => "submissionAcronym:\"BRO\"", :start => 0, :rows => 80}, :property) - assert_equal 80 , res["response"]["numFound"] + assert_equal 83 , res["response"]["numFound"] found = 0 res["response"]["docs"].each do |doc| @@ -1139,7 +1139,7 @@ def test_submission_metrics metrics.bring_remaining assert_instance_of LinkedData::Models::Metric, metrics - assert_includes [481, 486], metrics.classes # 486 if owlapi imports skos classes + assert_includes [481, 487], metrics.classes # 486 if owlapi imports skos classes assert_includes [63, 45], metrics.properties # 63 if owlapi imports skos properties assert_equal 124, metrics.individuals assert_includes [13, 14], metrics.classesWithOneChild # 14 if owlapi imports skos properties @@ -1161,7 +1161,7 @@ def test_submission_metrics metrics.bring_remaining #all the child metrics should be 0 since we declare it as flat - assert_equal 486, metrics.classes + assert_equal 487, metrics.classes assert_equal 63, metrics.properties assert_equal 124, metrics.individuals assert_equal 0, metrics.classesWithOneChild