Skip to content

Commit

Permalink
codacy check fix
Browse files Browse the repository at this point in the history
  • Loading branch information
liadmagen committed Sep 23, 2018
1 parent 7209717 commit 1a75963
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 8 additions & 2 deletions tests/use_case/test_arxiv_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,28 @@
pdf_url="pfg_url4",
)


@pytest.fixture
def domain_arxivdocs():
"""Creates a fixture for the returned objects
"""
return [arxiv_doc_1, arxiv_doc_2, arxiv_doc_3, arxiv_doc_4]


def assert_equal(arg1, arg2):
if arg1 != arg2:
raise AssertionError("Assert equal failed - values are not equal")


def _check_results(domain_models_list, data_list):
assert_equal(len(domain_models_list), len(data_list))
if not all([isinstance(dm, DomainModel) for dm in domain_models_list]):
raise AssertionError("not all domain model returned true")
assert_equal(set([dm.doc_id for dm in domain_models_list]),
set([d['doc_id'] for d in data_list]))
assert_equal(
set([dm.doc_id for dm in domain_models_list]),
set([d["doc_id"] for d in data_list]),
)


def test_repository_list_without_parameters(domain_arxivdocs):
repo = a_repo.ArxivRepo(domain_arxivdocs)
Expand Down
1 change: 0 additions & 1 deletion webminer/use_cases/request_arxiv/arxiv_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ def list(self, filters=None):

if not filters:
return self._entries

self._entries = self.fetch_papers()

result = []
Expand Down

0 comments on commit 1a75963

Please sign in to comment.