CORD-2247: Write basic static checker for xproto
Change-Id: I63a96972e16fd8dd62d4dec840eede66cbb26368
diff --git a/lib/xos-genx/xos-genx-tests/test_tosca.py b/lib/xos-genx/xos-genx-tests/test_tosca.py
index f829273..6807028 100644
--- a/lib/xos-genx/xos-genx-tests/test_tosca.py
+++ b/lib/xos-genx/xos-genx-tests/test_tosca.py
@@ -13,7 +13,7 @@
# limitations under the License.
import unittest
-from xosgenx.generator import XOSGenerator
+from xosgenx.generator import XOSProcessor
from helpers import FakeArgs, XProtoTestHelpers
@@ -46,7 +46,7 @@
args = FakeArgs()
args.inputs = xproto
args.target = self.target_tosca_type
- output = XOSGenerator.generate(args)
+ output = XOSProcessor.process(args)
self.assertIn('string', output)
self.assertIn('boolean', output)
self.assertIn('integer', output)
@@ -77,7 +77,7 @@
args = FakeArgs()
args.inputs = xproto
args.target = self.target_tosca_keys
- output = XOSGenerator.generate(args)
+ output = XOSProcessor.process(args)
self.assertIn('name', output)
def test_xproto_fields_to_tosca_keys_custom(self):
@@ -98,7 +98,7 @@
args = FakeArgs()
args.inputs = xproto
args.target = self.target_tosca_keys
- output = XOSGenerator.generate(args)
+ output = XOSProcessor.process(args)
self.assertNotIn('name', output)
self.assertIn('key_1', output)
self.assertIn('key_2', output)
@@ -120,7 +120,7 @@
args = FakeArgs()
args.inputs = xproto
args.target = self.target_tosca_keys
- output = XOSGenerator.generate(args)
+ output = XOSProcessor.process(args)
self.assertNotIn('name', output)
self.assertIn('provider_service_instance_id', output)
@@ -147,7 +147,7 @@
args = FakeArgs()
args.inputs = xproto
args.target = self.target_tosca_keys
- output = XOSGenerator.generate(args)
+ output = XOSProcessor.process(args)
self.assertIn("['name', ['key_4', 'key_3'], ['key_1', 'key_2']]", output)
xproto = \
@@ -166,5 +166,5 @@
"""
args.inputs = xproto
- output = XOSGenerator.generate(args)
- self.assertIn("['name', ['key_1_id', 'key_3_id', 'key_2_id']]", output)
\ No newline at end of file
+ output = XOSProcessor.process(args)
+ self.assertIn("['name', ['key_1_id', 'key_3_id', 'key_2_id']]", output)