def test_empty(self):
     nc = NodeConfig(
         node_index=0,
         data_address=gen_SocketAddress(),
         roles=set(),
         location_per_scope={},
         name="",
     )
     ns = NodeState(node_index=0)
     mnts = []
     self._validate(NodeView(nc, ns, mnts), nc, ns, mnts)
 def test_no_name(self):
     addr = gen_SocketAddress()
     self.assertEqual(
         NodeView(
             node_config=NodeConfig(
                 node_index=0,
                 data_address=addr,
                 roles=set(),
                 location_per_scope={},
                 name="",
             ),
             node_state=NodeState(node_index=0),
             maintenances=[],
         ).node_name,
         str(SocketAddress.from_thrift(addr)),
     )