From 985406c77917158338a1f294063d194b9807dff9 Mon Sep 17 00:00:00 2001 From: AkhilJ321 Date: Wed, 7 Feb 2024 17:19:46 +0530 Subject: [PATCH] fixed imports in tests --- test/runtime/runtime-python.ts | 2 +- test/runtime/runtime-python/test/main.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/test/runtime/runtime-python.ts b/test/runtime/runtime-python.ts index 1974854da8..3402b0a5be 100644 --- a/test/runtime/runtime-python.ts +++ b/test/runtime/runtime-python.ts @@ -12,7 +12,7 @@ generator.generateToFiles( path.resolve( // eslint-disable-next-line no-undef __dirname, - "./runtime-python/test/main/" + "./runtime-python/src/main/" ), {} ); diff --git a/test/runtime/runtime-python/test/main.py b/test/runtime/runtime-python/test/main.py index 83a0669ebb..2d35e14d10 100644 --- a/test/runtime/runtime-python/test/main.py +++ b/test/runtime/runtime-python/test/main.py @@ -1,6 +1,8 @@ import unittest -from main.Address import Address -from main.NestedObject import NestedObject +import sys +sys.path.insert(1, '../src/main/') +from Address import Address +from NestedObject import NestedObject import json class AddressData: @@ -16,7 +18,7 @@ def __init__(self, data): 'marriage': True, 'members': 3, 'arrayType': ['test1', 'test2'], - 'nestedObject': {'test': 'test'}, + 'nestedObject': {'test': 'test', 'additionalProperties': {'prop': 'value'}}, 'additionalProperties': {'prop': 'value'} } data_obj = Data(data)