aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Jagiello <michal.jagiello@t-mobile.pl>2024-02-02 13:10:35 +0100
committerMichal Jagiello <michal.jagiello@t-mobile.pl>2024-02-02 13:10:35 +0100
commit977ce124268483e795479988a272ed96d7b56102 (patch)
treec1b12e14d41a39b423d4acee6cd90b2a6a1995cf
parent8b34966c26139c9e9d76123a21b7a6e32e51947c (diff)
Bugfix version 13.0.1
Fix a bug on query creation related with fact that Enum by default not use it's values as a __repr__ (which is a StrEnum default behaviour but it's not available on Python 3.8) Issue-ID: TEST-404 Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl> Change-Id: I4a71d4c32f1f2f784c7bb12abde194c9673f8eae
-rw-r--r--src/onapsdk/sdc2/sdc_resource.py2
-rw-r--r--src/onapsdk/version.py2
-rw-r--r--tests/test_sdc2_resource.py4
-rw-r--r--tests/test_version.py2
4 files changed, 7 insertions, 3 deletions
diff --git a/src/onapsdk/sdc2/sdc_resource.py b/src/onapsdk/sdc2/sdc_resource.py
index 16f8ceb..39d7d9a 100644
--- a/src/onapsdk/sdc2/sdc_resource.py
+++ b/src/onapsdk/sdc2/sdc_resource.py
@@ -267,7 +267,7 @@ class SDCResource(SDCCatalog): # pylint: disable=too-many-instance-attributes
str: HTTP query
"""
- return "&".join([f"excludeTypes={exclude_type}" for exclude_type in
+ return "&".join([f"excludeTypes={exclude_type.value}" for exclude_type in
ResoureTypeEnum.iter_without_resource_type(type_to_not_exclude)])
@classmethod
diff --git a/src/onapsdk/version.py b/src/onapsdk/version.py
index e338553..8dc179f 100644
--- a/src/onapsdk/version.py
+++ b/src/onapsdk/version.py
@@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "13.0.0"
+__version__ = "13.0.1"
diff --git a/tests/test_sdc2_resource.py b/tests/test_sdc2_resource.py
index e4d25c1..b9a3211 100644
--- a/tests/test_sdc2_resource.py
+++ b/tests/test_sdc2_resource.py
@@ -12,3 +12,7 @@ def test_build_exclude_types_query():
assert query.count("excludeTypes=") == 12
with raises(ValueError):
parse_qs(query)["excludeTypes"].index(resource_type.value)
+ for other_resource_type in ResoureTypeEnum:
+ if other_resource_type == resource_type:
+ continue
+ parse_qs(query)["excludeTypes"].index(other_resource_type.value)
diff --git a/tests/test_version.py b/tests/test_version.py
index 3b30793..b3c9572 100644
--- a/tests/test_version.py
+++ b/tests/test_version.py
@@ -17,4 +17,4 @@ import onapsdk.version as version
def test_version():
"""Check version is the right one."""
- assert version.__version__ == '13.0.0'
+ assert version.__version__ == '13.0.1'