def download_test_package():
    return sim_db.download_package("test_package")
 def test_package_added_to_local_db(self):
     local_pkgs_before = sim_db.get_local_packages(sim_db._local_inst_db())
     sim_db.download_package("test_package")
     local_pkgs_after = sim_db.get_local_packages(sim_db._local_inst_db())
     assert len(local_pkgs_after) == len(local_pkgs_before) + 1
 def test_raise_error_when_pkg_file_doesnt_exist(self):
     with pytest.raises(ValueError):
         sim_db.download_package("non_existent_pkg")
 def test_package_file_exists_on_local_drive(self):
     local_filename = sim_db.download_package("test_package")
     assert os.path.exists(local_filename)
 def test_raise_error_when_pkg_not_in_db(self):
     with pytest.raises(ValueError):
         sim_db.download_package("bogus")