Skip to content

Commit

Permalink
fix: consolidate profiles_id and profile_id (#53)
Browse files Browse the repository at this point in the history
Signed-off-by: Timothy-Yao <timothy.yao@ibm.com>
Co-authored-by: Timothy-Yao <timothy.yao@ibm.com>
  • Loading branch information
tyao117 and tyao117 authored Jan 29, 2024
1 parent aa3591a commit 0497844
Show file tree
Hide file tree
Showing 14 changed files with 203 additions and 291 deletions.
95 changes: 2 additions & 93 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -43,97 +43,7 @@ confidence=HIGH
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
disable=too-many-arguments,
too-many-public-methods,
too-few-public-methods,
too-many-instance-attributes,
too-many-locals,
too-many-branches,
too-many-lines,
line-too-long,
bad-continuation,
similarities,
print-statement,
parameter-unpacking,
unpacking-in-except,
old-raise-syntax,
backtick,
long-suffix,
old-ne-operator,
old-octal-literal,
import-error,
import-star-module-level,
non-ascii-bytes-literal,
raw-checker-failed,
bad-inline-option,
locally-disabled,
file-ignored,
suppressed-message,
useless-suppression,
deprecated-pragma,
use-symbolic-message-instead,
apply-builtin,
basestring-builtin,
buffer-builtin,
cmp-builtin,
coerce-builtin,
execfile-builtin,
file-builtin,
long-builtin,
raw_input-builtin,
reduce-builtin,
standarderror-builtin,
unicode-builtin,
xrange-builtin,
coerce-method,
delslice-method,
getslice-method,
setslice-method,
no-absolute-import,
old-division,
dict-iter-method,
dict-view-method,
next-method-called,
metaclass-assignment,
indexing-exception,
raising-string,
reload-builtin,
oct-method,
hex-method,
nonzero-method,
cmp-method,
input-builtin,
round-builtin,
intern-builtin,
unichr-builtin,
map-builtin-not-iterating,
zip-builtin-not-iterating,
range-builtin-not-iterating,
filter-builtin-not-iterating,
using-cmp-argument,
eq-without-hash,
div-method,
idiv-method,
rdiv-method,
exception-message-attribute,
invalid-str-codec,
sys-max-int,
bad-python3-import,
deprecated-string-function,
deprecated-str-translate-call,
deprecated-itertools-function,
deprecated-types-field,
next-method-defined,
dict-items-not-iterating,
dict-keys-not-iterating,
dict-values-not-iterating,
deprecated-operator-function,
deprecated-urllib-function,
xreadlines-attribute,
deprecated-sys-function,
exception-escape,
comprehension-escape,
invalid-name
disable=C0103,W0603

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down Expand Up @@ -572,5 +482,4 @@ valid-metaclass-classmethod-first-arg=cls

# Exceptions that will emit a warning when being caught. Defaults to
# "BaseException, Exception".
overgeneral-exceptions=BaseException,
Exception
overgeneral-exceptions=builtins.BaseException
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ install_project:
test: test-unit test-int

test-unit:
python -m pytest test/unit
python -m pytest tests/unit

test-int:
python -m pytest test/integration
python -m pytest tests/integration

lint:
./pylint.sh
2 changes: 1 addition & 1 deletion build/testScript.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
set -euo pipefail
echo "${SCC_ENV}" | base64 -d >> security_and_compliance_center_api_v3.env
python -m pytest test/integration
python -m pytest tests/integration
16 changes: 8 additions & 8 deletions examples/test_security_and_compliance_center_api_v3_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ def test_get_profile_example(self):
# begin-get_profile

response = security_and_compliance_center_api_service.get_profile(
profiles_id=profile_id_link,
profile_id=profile_id_link,
)
profile = response.get_result()

Expand Down Expand Up @@ -598,7 +598,7 @@ def test_replace_profile_example(self):
}

response = security_and_compliance_center_api_service.replace_profile(
profiles_id=profile_id_link,
profile_id=profile_id_link,
profile_name='test_profile1',
profile_description='test_description1',
profile_type='custom',
Expand Down Expand Up @@ -752,7 +752,7 @@ def test_create_attachment_example(self):
}

response = security_and_compliance_center_api_service.create_attachment(
profiles_id=profile_id_link,
profile_id=profile_id_link,
attachments=[attachments_prototype_model],
)
attachment_prototype = response.get_result()
Expand All @@ -777,7 +777,7 @@ def test_list_attachments_example(self):
all_results = []
pager = AttachmentsPager(
client=security_and_compliance_center_api_service,
profiles_id=profile_id_link,
profile_id=profile_id_link,
x_correlation_id='testString',
x_request_id='testString',
limit=10,
Expand All @@ -804,7 +804,7 @@ def test_get_profile_attachment_example(self):

response = security_and_compliance_center_api_service.get_profile_attachment(
attachment_id=attachment_id_link,
profiles_id=profile_id_link,
profile_id=profile_id_link,
)
attachment_item = response.get_result()

Expand Down Expand Up @@ -857,7 +857,7 @@ def test_replace_profile_attachment_example(self):

response = security_and_compliance_center_api_service.replace_profile_attachment(
attachment_id=attachment_id_link,
profiles_id=profile_id_link,
profile_id=profile_id_link,
scope=[multi_cloud_scope_model],
status='enabled',
schedule='every_30_days',
Expand Down Expand Up @@ -1340,7 +1340,7 @@ def test_delete_profile_attachment_example(self):

response = security_and_compliance_center_api_service.delete_profile_attachment(
attachment_id=attachment_id_link,
profiles_id=profile_id_link,
profile_id=profile_id_link,
)
attachment_item = response.get_result()

Expand All @@ -1361,7 +1361,7 @@ def test_delete_custom_profile_example(self):
# begin-delete_custom_profile

response = security_and_compliance_center_api_service.delete_custom_profile(
profiles_id=profile_id_link,
profile_id=profile_id_link,
)
profile = response.get_result()

Expand Down
Loading

0 comments on commit 0497844

Please sign in to comment.