Esempio n. 1
0
 def call_quote(self, other_args: List[str]):
     """Process quote command."""
     parser = argparse.ArgumentParser(
         add_help=False,
         formatter_class=argparse.ArgumentDefaultsHelpFormatter,
         prog="quote",
         description="Get current exchange rate quote",
     )
     ns_parser = parse_known_args_and_warn(parser, other_args)
     if ns_parser:
         if self.to_symbol and self.from_symbol:
             av_view.display_quote(self.to_symbol, self.from_symbol)
         else:
             console.print(
                 '[red]Make sure both a "to" symbol and a "from" symbol are selected.[/red]\n'
             )
Esempio n. 2
0
def test_display_quote(from_symbol, to_symbol):
    av_view.display_quote(from_symbol=from_symbol, to_symbol=to_symbol)