Skip to content

Commit

Permalink
sort set for exceptions list
Browse files Browse the repository at this point in the history
  • Loading branch information
eschutho committed Mar 1, 2022
1 parent 0cdc02d commit 1d29e9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion superset/commands/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def add_list(self, exceptions: List[ValidationError]) -> None:

def get_list_classnames(self) -> List[str]:
return list(
dict.fromkeys([ex.__class__.__name__ for ex in self._invalid_exceptions])
sorted({ ex.__class__.__name__ for ex in self._invalid_exceptions})
)

def normalized_messages(self) -> Dict[Any, Any]:
Expand Down
4 changes: 2 additions & 2 deletions tests/integration_tests/databases/commands_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ def test_create_duplicate_error(self, mock_logger):
mock_logger.assert_called_with(
action="db_connection_failed."
"DatabaseInvalidError."
"DatabaseRequiredFieldValidationError."
"DatabaseExistsValidationError"
"DatabaseExistsValidationError."
"DatabaseRequiredFieldValidationError"
)

@mock.patch(
Expand Down

0 comments on commit 1d29e9f

Please sign in to comment.