Skip to content

Commit

Permalink
fix: Set sorted list for 'supported_databases'
Browse files Browse the repository at this point in the history
  • Loading branch information
esloch committed Dec 5, 2023
1 parent 664828b commit f22486d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pysus/online_data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def list_data_sources() -> str:
]
# breakpoint()
return f"""Currently, the supported databases are: {
', '.join(supported_databases)}"""
', '.join(sorted(supported_databases))}"""
else:
expected_databases = [
"SINAN",
Expand Down
2 changes: 1 addition & 1 deletion pysus/tests/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_last_update(self):
class TestListDataSources(unittest.TestCase):
@patch("pysus.online_data.Path.exists")
def test_list_data_sources_exists(self, mock_exists):
dbs = "SIM, SIA, SINAN, SINASC, SIH, CNES"
dbs = "CNES, SIA, SIH, SIM, SINAN, SINASC"
mock_exists.return_value = True
expected_output = f"""Currently, the supported databases are: {dbs}"""
self.assertEqual(online_data.list_data_sources(), expected_output)
Expand Down

0 comments on commit f22486d

Please sign in to comment.