Exemplo n.º 1
0
 def test_cli_connection_get(self):
     with redirect_stdout(io.StringIO()) as stdout:
         connection_command.connections_get(
             self.parser.parse_args(["connections", "get", "google_cloud_default", "--output", "json"])
         )
         stdout = stdout.getvalue()
     self.assertIn("google-cloud-platform:///default", stdout)
Exemplo n.º 2
0
 def test_cli_connection_get_invalid(self):
     with self.assertRaisesRegex(SystemExit, re.escape("Connection not found.")):
         connection_command.connections_get(self.parser.parse_args(["connections", "get", "INVALID"]))
Exemplo n.º 3
0
 def test_cli_connection_get_invalid(self):
     with pytest.raises(SystemExit,
                        match=re.escape("Connection not found.")):
         connection_command.connections_get(
             self.parser.parse_args(["connections", "get", "INVALID"]))