Update server object for unit testing. 19/47019/1
authorThomas Duval <thomas.duval@orange.com>
Thu, 9 Nov 2017 15:24:06 +0000 (16:24 +0100)
committerThomas Duval <thomas.duval@orange.com>
Thu, 9 Nov 2017 15:24:06 +0000 (16:24 +0100)
Change-Id: I41f697966e0b7e73db6a4cfd6e5c5461854097fc

moonv4/moon_manager/moon_manager/server.py

index c317e31..f777fac 100644 (file)
@@ -30,8 +30,9 @@ def main():
         configuration.add_component(uuid="manager", name=hostname, port=port, bind=bind)
     LOG.info("Starting server with IP {} on port {} bind to {}".format(hostname, port, bind))
     server = HTTPServer(host=bind, port=port)
-    server.run()
+    return server
 
 
 if __name__ == '__main__':
-    main()
+    server = main()
+    server.run()