Skip to content

Commit

Permalink
Add a unit test for src.data_utils.get_data_types()
Browse files Browse the repository at this point in the history
  • Loading branch information
woctezuma committed May 22, 2021
1 parent 6b4c7f4 commit ace5245
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ def test_get_data_types(self):
self.assertIn("items", data_types)
self.assertIn("offers", data_types)

def test_get_data_file_name(self):
data_types = src.data_utils.get_data_types()
for data_type in data_types:
fname = src.data_utils.get_data_file_name(data_type)
expected_fname = f"data/{data_type}_list.json"
self.assertEqual(fname, expected_fname)

def test_load_data(self):
data = src.data_utils.load_data()
self.assertGreater(len(data), 0)
Expand Down

0 comments on commit ace5245

Please sign in to comment.