Пример #1
0
 def test_show(self):
     args = server.parse_args([])
     result = args.show
     expect = False
     self.assertEqual(expect, result)
Пример #2
0
 def check(self, argv, attr, expect):
     args = server.parse_args(argv)
     result = getattr(args, attr)
     self.assertEqual(expect, result)
Пример #3
0
 def test_port_given_flag(self):
     args = server.parse_args(["--port", "8888"])
     result = args.port
     expect = 8888
     self.assertEqual(expect, result)
Пример #4
0
 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)
Пример #5
0
 def test_port(self):
     args = server.parse_args([])
     result = args.port
     expect = 5006
     self.assertEqual(expect, result)