Skip to content

Commit

Permalink
add flake8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahbeenie committed Nov 14, 2019
1 parent aa824ad commit d9b6b30
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_shared/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,30 @@

from pathme.wikipathways.utils import merge_two_dicts, get_file_name_from_url
from pathme.export_utils import get_paths_in_folder

from tests.constants import WP_TEST_RESOURCES, WP22, WP2359


class TestUtils(unittest.TestCase):
"""Tests for utils."""

def test_get_wikipathways_files(self):
"""Test getting WikiPathways files."""
files = get_paths_in_folder(WP_TEST_RESOURCES)

self.assertEqual(len(files), 7)
self.assertEqual(os.path.join(WP_TEST_RESOURCES, WP22), WP22)

def test_merge_dict(self):
"""Test merging of two dictionaries."""
dict_1 = {1: 'uno'}
dict_2 = {2: 'dos'}
merged_dict = merge_two_dicts(dict_1, dict_2)

self.assertEqual(merged_dict, {1: 'uno', 2: 'dos'})

def test_url(self):
"""Test get url."""
world = get_file_name_from_url('https://hello/world')

self.assertEqual(world, 'world')

0 comments on commit d9b6b30

Please sign in to comment.