mirror of
https://github.com/Telecominfraproject/oopt-gnpy-api.git
synced 2025-11-01 02:18:08 +00:00
Feat: create project skeleton using CANDI POC experimental api
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com> Change-Id: I44c9c96c58fabb79e2b569f7b404036b475b4fde
This commit is contained in:
@@ -3,8 +3,29 @@
|
||||
# @Author: Esther Le Rouzic
|
||||
# @Date: 2025-02-03
|
||||
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
import pytest # noqa: F401
|
||||
|
||||
|
||||
YANG_DIR = Path(__file__).parent.parent / 'gnpyapi' / 'yang'
|
||||
SAMPLE_DIR = Path(__file__).parent.parent / 'samples'
|
||||
|
||||
|
||||
def test_sample():
|
||||
"""Just for the ci
|
||||
"""
|
||||
assert True
|
||||
res = subprocess.run(['python', SAMPLE_DIR / 'fake_sample.py'],
|
||||
stdout=subprocess.PIPE, check=True)
|
||||
if res.returncode != 0:
|
||||
assert False, f'gnpy call failed: exit code {res.returncode}'
|
||||
|
||||
|
||||
def test_pyang():
|
||||
"""Verify that yang models pss pyang
|
||||
"""
|
||||
res = subprocess.run(['pyang', '-f', 'tree', '--tree-line-length', '69',
|
||||
'-p', YANG_DIR, YANG_DIR / 'gnpy-api@2021-01-06.yang'],
|
||||
stdout=subprocess.PIPE, check=True)
|
||||
if res.returncode != 0:
|
||||
assert False, f'pyang failed: exit code {res.returncode}'
|
||||
|
||||
Reference in New Issue
Block a user