def test_show(self): args = server.parse_args([]) result = args.show expect = False self.assertEqual(expect, result)
def check(self, argv, attr, expect): args = server.parse_args(argv) result = getattr(args, attr) self.assertEqual(expect, result)
def test_port_given_flag(self): args = server.parse_args(["--port", "8888"]) result = args.port expect = 8888 self.assertEqual(expect, result)
def test_allow_web_socket_origin(self): args = server.parse_args(["--allow-websocket-origin", "site.com"]) result = args.allow_websocket_origin expect = ["site.com"] self.assertEqual(expect, result)
def test_port(self): args = server.parse_args([]) result = args.port expect = 5006 self.assertEqual(expect, result)