1.3.0
This commit is contained in:
@@ -4,17 +4,19 @@ from dynamix_sdk.utils import gen_cls_name_from_url_path
|
||||
|
||||
def test_api_class_naming(api_groups):
|
||||
for api_group in api_groups:
|
||||
correct_class_name = f'{api_group.name.capitalize()}API'
|
||||
correct_class_name = gen_cls_name_from_url_path(
|
||||
url_path=api_group.name,
|
||||
postfix='API',
|
||||
)
|
||||
assert api_group.cls.__qualname__ == correct_class_name, (
|
||||
f'\nAPI group: {api_group.name}'
|
||||
f'\nCorrect API class name: {correct_class_name}'
|
||||
)
|
||||
|
||||
for api_subgroup in api_group.subgroups:
|
||||
correct_class_name = (
|
||||
f'{api_group.name.capitalize()}'
|
||||
f'{api_subgroup.name.capitalize()}'
|
||||
f'API'
|
||||
correct_class_name = gen_cls_name_from_url_path(
|
||||
url_path=f'{api_group.name}/{api_subgroup.name}',
|
||||
postfix='API',
|
||||
)
|
||||
assert api_subgroup.cls.__qualname__ == correct_class_name, (
|
||||
f'\nAPI group: {api_group.name}'
|
||||
|
||||
Reference in New Issue
Block a user