コード例 #1
0
 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())
コード例 #2
0
 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())
コード例 #3
0
 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())
コード例 #4
0
 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())