Skip to content

Commit

Permalink
Remove irrelevant redirect tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
grosscol committed Feb 2, 2022
1 parent 8a9ec39 commit 5a41a9c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 380 deletions.
12 changes: 9 additions & 3 deletions tests/legacy_ui/test_autocomplete.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
from unittest.mock import patch
from flask import Flask
from bravo_api.blueprints.legacy_ui import autocomplete
from unittest.mock import patch

app = Flask('dummy')
app.register_blueprint(autocomplete.bp)
app.config['BRAVO_API_PAGE_LIMIT'] = 1000


# Mock empty snv or gene results
Expand Down Expand Up @@ -77,8 +82,9 @@ def test_autocomplete_combination(search_gene_patch, search_variant_patch):


@patch('bravo_api.blueprints.legacy_ui.autocomplete.aggregate')
def test_autocomplete(aggregate_patch, client):
def test_autocomplete(aggregate_patch):
aggregate_patch.return_value = {'suggestions': [{}, {}, {}]}
resp = client.get('/autocomplete?query=example')
with app.test_client() as client:
resp = client.get('/autocomplete?query=example')
assert(resp.status_code == 200)
assert(resp.content_type == 'application/json')
2 changes: 1 addition & 1 deletion tests/legacy_ui/test_gene_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def mock_get_genes_by_name(name):
return({'data': [1, 2, 3], 'total': 3, 'limit': None, 'next': None, 'error': None})


def test_genes_by_name(mocker, client):
def test_genes_by_name(mocker):
mock = mocker.patch('bravo_api.blueprints.legacy_ui.pretty_api.get_genes_by_name',
side_effect=mock_get_genes_by_name)
name = 'foo'
Expand Down
Loading

0 comments on commit 5a41a9c

Please sign in to comment.