aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_sdc2.py
blob: ac4a92ce1e9329cb4f20668b283d5ee34d372f49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from urllib.parse import parse_qs

from pytest import raises

from onapsdk.sdc2.sdc import SDC, ResoureTypeEnum
from onapsdk.sdc2.sdc_resource import SDCResource


def test_resource_type_enum():
    assert len(list(ResoureTypeEnum)) == 13


def test_sdc_filter_exclude_resource_type():
    for resource_type in ResoureTypeEnum:
        resource_types_list_without_one_type = list(ResoureTypeEnum.iter_without_resource_type(resource_type))
        assert len(resource_types_list_without_one_type) == 12
        with raises(ValueError):
            resource_types_list_without_one_type.index(resource_type)