Skip to content

Commit

Permalink
rename invalid_integration_name
Browse files Browse the repository at this point in the history
  • Loading branch information
YairGlik committed Apr 4, 2024
1 parent a5caeb8 commit c172aa1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions demisto_sdk/commands/validate/tests/BA_validators_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1878,7 +1878,7 @@ def test_IsContentItemNameContainTrailingSpacesValidator_fix(
pytest.param(
[
create_integration_object(
integration_folder_name="invalid_integration_name"
name="invalid_integration_name"
),
],
"The folder name 'invalid_integration_name' should be without any separator.",
Expand All @@ -1887,7 +1887,7 @@ def test_IsContentItemNameContainTrailingSpacesValidator_fix(
pytest.param(
[
create_integration_object(
integration_folder_name="invalidIntegrationName"
name="invalidIntegrationName"
),
],
"",
Expand Down
6 changes: 3 additions & 3 deletions demisto_sdk/commands/validate/tests/test_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def create_integration_object(
values: Optional[List[Any]] = None,
pack_info: Optional[Dict[str, Any]] = None,
readme_content: Optional[str] = None,
integration_folder_name: Optional[str] = None,
name: Optional[str] = None,
code: Optional[str] = None,
) -> Integration:
"""Creating an integration object with altered fields from a default integration yml structure.
Expand All @@ -55,8 +55,8 @@ def create_integration_object(
if readme_content is not None:
additional_params["readme"] = readme_content

if integration_folder_name is not None:
additional_params["name"] = integration_folder_name
if name is not None:
additional_params["name"] = name

integration = pack.create_integration(yml=yml_content, **additional_params)
code = code or "from MicrosoftApiModule import *"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class IsFolderNameHasSeparatorsValidator(BaseValidator[ContentTypes]):
expected_git_statuses = [GitStatuses.RENAMED, GitStatuses.ADDED]

def is_valid(self, content_items: Iterable[ContentTypes]) -> List[ValidationResult]:
separators = [" ", "_", "-"]
separators = ["_", "-"]
return [
ValidationResult(
validator=self,
Expand Down

0 comments on commit c172aa1

Please sign in to comment.