def test_display_chains(calls_only, max_sp, min_sp, mocker, puts_only):
    # MOCK EXPORT_DATA
    mocker.patch(target="gamestonk_terminal.stocks.options.tradier_view.export_data")

    # MOCK USE_COLOR
    mocker.patch.object(
        target=tradier_view.rich_config, attribute="USE_COLOR", new=True
    )

    tradier_view.display_chains(
        ticker="AAPL",
        expiry="2022-02-25",
        to_display=["volume"],
        min_sp=min_sp,
        max_sp=max_sp,
        calls_only=calls_only,
        puts_only=puts_only,
        export="",
    )
 def call_chains(self, other_args: List[str]):
     """Process chains command"""
     parser = argparse.ArgumentParser(
         prog="chains",
         add_help=False,
         formatter_class=argparse.ArgumentDefaultsHelpFormatter,
         description="Display option chains",
     )
     parser.add_argument(
         "-c",
         "--calls",
         action="store_true",
         default=False,
         dest="calls",
         help="Flag to show calls only",
     )
     parser.add_argument(
         "-p",
         "--puts",
         action="store_true",
         default=False,
         dest="puts",
         help="Flag to show puts only",
     )
     parser.add_argument(
         "-m",
         "--min",
         dest="min_sp",
         type=float,
         default=-1,
         help="minimum strike price to consider.",
     )
     parser.add_argument(
         "-M",
         "--max",
         dest="max_sp",
         type=float,
         default=-1,
         help="maximum strike price to consider.",
     )
     parser.add_argument(
         "-d",
         "--display",
         dest="to_display",
         default=tradier_model.default_columns,
         type=tradier_view.check_valid_option_chains_headers,
         help=
         "columns to look at.  Columns can be:  {bid, ask, strike, bidsize, asksize, volume, open_interest, "
         "delta, gamma, theta, vega, ask_iv, bid_iv, mid_iv} ",
     )
     ns_parser = parse_known_args_and_warn(parser, other_args,
                                           EXPORT_ONLY_RAW_DATA_ALLOWED)
     if ns_parser:
         if self.ticker:
             if self.selected_date:
                 if TRADIER_TOKEN != "REPLACE_ME":
                     tradier_view.display_chains(
                         ticker=self.ticker,
                         expiry=self.selected_date,
                         to_display=ns_parser.to_display,
                         min_sp=ns_parser.min_sp,
                         max_sp=ns_parser.max_sp,
                         calls_only=ns_parser.calls,
                         puts_only=ns_parser.puts,
                         export=ns_parser.export,
                     )
                 else:
                     print("TRADIER TOKEN not supplied. \n")
             else:
                 print("No expiry loaded. First use `exp {expiry date}`\n")
         else:
             print("No ticker loaded. First use `load <ticker>`\n")