Skip to content
This repository has been archived by the owner on Jan 31, 2018. It is now read-only.

Commit

Permalink
Use the same VCR cassette in all tests - should make requests more ef…
Browse files Browse the repository at this point in the history
…ficient
  • Loading branch information
dazoakley committed Feb 8, 2012
1 parent 6da1c21 commit 43e3bfa
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 19 deletions.
2 changes: 1 addition & 1 deletion test/test_biomart.rb
Expand Up @@ -2,7 +2,7 @@

class BiomartTest < Test::Unit::TestCase
def setup
VCR.insert_cassette('test_biomart_module')
VCR.insert_cassette('test_biomart')
@htgt = Biomart::Server.new('http://www.sanger.ac.uk/htgt/biomart')
@htgt_alt = Biomart::Server.new('http://www.sanger.ac.uk/htgt/biomart')
end
Expand Down
2 changes: 1 addition & 1 deletion test/test_biomart_attribute.rb
Expand Up @@ -2,7 +2,7 @@

class BiomartAttributeTest < Test::Unit::TestCase
def setup
VCR.insert_cassette('test_biomart_attribute')
VCR.insert_cassette('test_biomart')
@htgt = Biomart::Server.new('http://www.sanger.ac.uk/htgt/biomart')
@htgt_alt = Biomart::Server.new('http://www.sanger.ac.uk/htgt/biomart')
end
Expand Down
2 changes: 1 addition & 1 deletion test/test_biomart_database.rb
Expand Up @@ -2,7 +2,7 @@

class BiomartDatabaseTest < Test::Unit::TestCase
def setup
VCR.insert_cassette('test_biomart_database')
VCR.insert_cassette('test_biomart')
@htgt = Biomart::Server.new('http://www.sanger.ac.uk/htgt/biomart')
@htgt_alt = Biomart::Server.new('http://www.sanger.ac.uk/htgt/biomart')
end
Expand Down
15 changes: 1 addition & 14 deletions test/test_biomart_dataset.rb
Expand Up @@ -2,7 +2,7 @@

class BiomartDatasetTest < Test::Unit::TestCase
def setup
VCR.insert_cassette('test_biomart_dataset')
VCR.insert_cassette('test_biomart')
@htgt = Biomart::Server.new('http://www.sanger.ac.uk/htgt/biomart')
@htgt_alt = Biomart::Server.new('http://www.sanger.ac.uk/htgt/biomart')
end
Expand Down Expand Up @@ -101,19 +101,6 @@ def teardown
assert( search.is_a?( Hash ), "Biomart::Dataset.search (no options) is not returning a hash. (HTGT Query)" )
assert( search[:data].is_a?( Array ), "Biomart::Dataset.search[:data] (no options) is not returning an array. (HTGT Query)" )
assert( search[:data].size > 20, "Biomart::Dataset.search[:data] for poorly formatted TSV data is empty. (HTGT Query)" )

search2 = @emma.search(
:filters => { "emma_id" => ["EM:03629"] },
:attributes => [
"emma_id", "international_strain_name", "synonym", "maintained_background",
"mutation_main_type", "mutation_sub_type", "alls_form", "genetic_description",
"phenotype_description", "reference", "pubmed_id", "availability", "owner"
]
)

assert( search2.is_a?( Hash ), "Biomart::Dataset.search (no options) is not returning a hash. (EMMA Query)" )
assert( search2[:data].is_a?( Array ), "Biomart::Dataset.search[:data] (no options) is not returning an array. (EMMA Query)" )
assert( search2[:data].size > 0, "Biomart::Dataset.search[:data] for poorly formatted TSV data is empty. (EMMA Query)" )
end

should "perform federated search queries" do
Expand Down
2 changes: 1 addition & 1 deletion test/test_biomart_filter.rb
Expand Up @@ -2,7 +2,7 @@

class BiomartFilterTest < Test::Unit::TestCase
def setup
VCR.insert_cassette('test_biomart_filter')
VCR.insert_cassette('test_biomart')
@htgt = Biomart::Server.new('http://www.sanger.ac.uk/htgt/biomart')
@htgt_alt = Biomart::Server.new('http://www.sanger.ac.uk/htgt/biomart')
end
Expand Down
2 changes: 1 addition & 1 deletion test/test_biomart_server.rb
Expand Up @@ -2,7 +2,7 @@

class BiomartServerTest < Test::Unit::TestCase
def setup
VCR.insert_cassette('test_biomart_server')
VCR.insert_cassette('test_biomart')
@htgt = Biomart::Server.new('http://www.sanger.ac.uk/htgt/biomart')
@htgt_alt = Biomart::Server.new('http://www.sanger.ac.uk/htgt/biomart')
end
Expand Down

0 comments on commit 43e3bfa

Please sign in to comment.