[CORD-2810] Only synchronizers can write feedback state
Change-Id: Ia3f28763a0212a570186e4c6c5cb118c40325b5b
diff --git a/lib/xos-genx/xos-genx-tests/test_django_generator.py b/lib/xos-genx/xos-genx-tests/test_django_generator.py
index 0ba90b5..c3ffef5 100644
--- a/lib/xos-genx/xos-genx-tests/test_django_generator.py
+++ b/lib/xos-genx/xos-genx-tests/test_django_generator.py
@@ -73,6 +73,32 @@
self.assertEqual(len(blank_true), 1)
self.assertEqual(len(blank_false), 1)
+ def test_feedback_state(self):
+ """
+ [XOS-GenX] Generate DJANGO models, verify feedback_state fields
+ """
+ xproto = \
+ """
+ option app_label = "test";
+
+ message ParentFoo {
+ required string parent_name = 1 [null = False, blank = False, feedback_state = True];
+ }
+
+ message Foo (ParentFoo) {
+ required string name = 1 [null = False, blank = False, feedback_state = True];
+ }
+ """
+
+ args = FakeArgs()
+ args.inputs = xproto
+ args.target = 'django.xtarget'
+ output = XOSProcessor.process(args)
+
+ print output
+
+ self.assertIn("feedback_state_fields = ['parent_name', 'name']", output)
+
if __name__ == '__main__':
unittest.main()