def test_credentials_file_must_be_json(self):
     with capture_stderr() as stderr:
         with temp_file("not json") as credentials_path:
             with json_file({}) as query_path:
                 args = ["-c", credentials_path, "-q", query_path]
                 assert_raises(SystemExit, parse_args, args=args)
                 ok_("invalid _load_json_file value" in stderr.getvalue())
 def test_credentials_file_must_be_json(self):
     with capture_stderr() as stderr:
         with temp_file("not json") as credentials_path:
             with json_file({}) as query_path:
                 args = ["-c", credentials_path, "-q", query_path]
                 assert_raises(
                     SystemExit, parse_args, args=args)
                 ok_("invalid _load_json_file value" in stderr.getvalue())
 def test_query_file_must_be_json(self):
     with capture_stderr() as stderr:
         with temp_file("not json") as query_path:
             assert_raises(
                 SystemExit, parse_args, args=["-q", query_path])
             ok_("invalid _load_json_file value" in stderr.getvalue())
 def test_query_file_must_be_json(self):
     with capture_stderr() as stderr:
         with temp_file("not json") as query_path:
             assert_raises(SystemExit, parse_args, args=["-q", query_path])
             ok_("invalid _load_json_file value" in stderr.getvalue())