diff --git a/lib/xos-genx/xos-genx-tests/test_field_graph.py b/lib/xos-genx/xos-genx-tests/test_field_graph.py
index 478708a..cfb4c8b 100644
--- a/lib/xos-genx/xos-genx-tests/test_field_graph.py
+++ b/lib/xos-genx/xos-genx-tests/test_field_graph.py
@@ -1,4 +1,3 @@
-
 # Copyright 2017-present Open Networking Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -18,11 +17,12 @@
 from xosgenx.jinja2_extensions import FieldNotFound
 from helpers import XProtoTestHelpers
 from xosgenx.generator import XOSProcessor, XOSProcessorArgs
+from functools import reduce
+
 
 class XProtoFieldGraphTest(unittest.TestCase):
     def _test_field_graph(self):
-        xproto = \
-"""
+        xproto = """
 message VRouterDevice (PlCoreBase){
      optional string name = 1 [help_text = "device friendly name", max_length = 20, null = True, db_index = False, blank = True, unique_with="openflow_id"];
      required string openflow_id = 2 [help_text = "device identifier in ONOS", max_length = 20, null = False, db_index = False, blank = False, unique_with="name"];
@@ -39,45 +39,46 @@
 }
 """
         target = XProtoTestHelpers.write_tmp_target(
-"""
+            """
 {{ xproto_field_graph_components(proto.messages.0.fields, proto.messages.0) }}
-""")
+"""
+        )
 
-        args = XOSProcessorArgs(inputs = xproto,
-                                target = target)
+        args = XOSProcessorArgs(inputs=xproto, target=target)
         output = XOSProcessor.process(args)
-        output =  eval(output)
-        self.assertIn({'A','B','C'}, output)
-        self.assertIn({'openflow_id','name'}, output)
-        self.assertIn({'config_key','vrouter_service','driver'}, output)
-        self.assertIn({'E','F','G'}, output)
-        
-        union = reduce(lambda acc,x: acc | x, output)
-        self.assertNotIn('D', union) 
+        output = eval(output)
+        self.assertIn({"A", "B", "C"}, output)
+        self.assertIn({"openflow_id", "name"}, output)
+        self.assertIn({"config_key", "vrouter_service", "driver"}, output)
+        self.assertIn({"E", "F", "G"}, output)
+
+        union = reduce(lambda acc, x: acc | x, output)
+        self.assertNotIn("D", union)
 
     def test_missing_field(self):
-        xproto = \
-"""
+        xproto = """
 message Foo (PlCoreBase){
      required string A = 6 [unique_with="B"];
 }
 """
         target = XProtoTestHelpers.write_tmp_target(
-"""
+            """
 {{ xproto_field_graph_components(proto.messages.0.fields, proto.messages.0) }}
-""")
+"""
+        )
 
         def generate():
-            args = XOSProcessorArgs(inputs = xproto,
-                                    target = target)
+            args = XOSProcessorArgs(inputs=xproto, target=target)
             output = XOSProcessor.process(args)
 
         with self.assertRaises(FieldNotFound) as e:
-             generate()
+            generate()
 
-        self.assertEqual(e.exception.message, 'Field "B" not found in model "Foo", referenced from field "A" by option "unique_with"')
+        self.assertEqual(
+            e.exception.message,
+            'Field "B" not found in model "Foo", referenced from field "A" by option "unique_with"',
+        )
 
-if __name__ == '__main__':
+
+if __name__ == "__main__":
     unittest.main()
-
-
