@@ -560,58 +560,34 @@ def test_nb_with_backend_vpc_only(get_vpc_with_subnet):
560560 )
561561 nb_attrs = json .loads (nb_attrs )
562562 nb_id = str (nb_attrs [0 ]["id" ])
563-
564563 assert isinstance (ipaddress .ip_address (nb_attrs [0 ]["ipv4" ]), ipaddress .IPv4Address )
565564 assert isinstance (ipaddress .ip_address (nb_attrs [0 ]["ipv6" ]), ipaddress .IPv6Address )
566565 assert nb_attrs [0 ]["frontend_address_type" ] == "public"
567566 assert nb_attrs [0 ]["frontend_vpc_subnet_id" ] is None
568567
569568 nb_vpcs = exec_test_command (
570- BASE_CMDS ["nodebalancers" ]
571- + [
572- "vpcs-list" ,
573- nb_id ,
574- "--json" ,
575- ]
569+ BASE_CMDS ["nodebalancers" ] + ["vpcs-list" , nb_id , "--json" ,]
576570 )
577571 nb_vpcs = json .loads (nb_vpcs )
578-
579572 assert len (nb_vpcs ) == 1
580573 assert nb_vpcs [0 ]["purpose" ] == "backend"
581574
582575 nb_vpc = exec_test_command (
583- BASE_CMDS ["nodebalancers" ]
584- + [
585- "vpc-view" ,
586- nb_id ,
587- str (nb_vpcs [0 ]["id" ]),
588- "--json" ,
589- ]
576+ BASE_CMDS ["nodebalancers" ] + ["vpc-view" , nb_id , str (nb_vpcs [0 ]["id" ]), "--json" ,]
590577 )
591578 nb_vpc = json .loads (nb_vpc )
592-
593579 assert nb_vpc [0 ]["purpose" ] == "backend"
594580
595581 # TODO: Uncomment when API implementation of /backend_vpcs and /frontend_vpcs endpoints is finished
596582 # nb_backend_vpcs = exec_test_command(
597- # BASE_CMDS["nodebalancers"]
598- # + [
599- # "backend_vpcs-list",
600- # nb_id,
601- # "--json",
602- # ]
583+ # BASE_CMDS["nodebalancers"] + ["backend_vpcs-list", nb_id, "--json",]
603584 # )
604585 # nb_backend_vpcs = json.loads(nb_backend_vpcs)
605586 # assert len(nb_backend_vpcs) == 1
606587 # assert nb_backend_vpcs[0]["purpose"] == "backend"
607588 #
608589 # nb_frontend_vpcs = exec_test_command(
609- # BASE_CMDS["nodebalancers"]
610- # + [
611- # "frontend_vpcs-list",
612- # nb_id,
613- # "--json",
614- # ]
590+ # BASE_CMDS["nodebalancers"] + ["frontend_vpcs-list", nb_id, "--json",]
615591 # )
616592 # nb_frontend_vpcs = json.loads(nb_frontend_vpcs)
617593 # assert len(nb_frontend_vpcs) == 0
@@ -648,24 +624,14 @@ def test_nb_with_frontend_ipv4_only(get_vpc_with_subnet):
648624
649625 # TODO: Uncomment when API implementation of /backend_vpcs and /frontend_vpcs endpoints is finished
650626 # nb_frontend_vpcs = exec_test_command(
651- # BASE_CMDS["nodebalancers"]
652- # + [
653- # "frontend_vpcs-list",
654- # nb_id,
655- # "--json",
656- # ]
627+ # BASE_CMDS["nodebalancers"] + ["frontend_vpcs-list", nb_id, "--json",]
657628 # )
658629 # nb_frontend_vpcs = json.loads(nb_frontend_vpcs)
659630 # assert len(nb_frontend_vpcs) == 1
660631 # assert nb_frontend_vpcs[0]["purpose"] == "frontend"
661632 #
662633 # nb_backend_vpcs = exec_test_command(
663- # BASE_CMDS["nodebalancers"]
664- # + [
665- # "backend_vpcs-list",
666- # nb_id,
667- # "--json",
668- # ]
634+ # BASE_CMDS["nodebalancers"] + ["backend_vpcs-list", nb_id, "--json",]
669635 # )
670636 # nb_backend_vpcs = json.loads(nb_backend_vpcs)
671637 # assert len(nb_backend_vpcs) == 0
0 commit comments