コード例 #1
0
def test_print_insider_data(color, mocker):
    # MOCK GTFF
    mocker.patch.object(target=openinsider_view.gtff, attribute="USE_COLOR", new=color)

    # MOCK EXPORT_DATA
    mocker.patch(
        target="gamestonk_terminal.stocks.insider.openinsider_view.export_data"
    )

    openinsider_view.print_insider_data(
        type_insider="lip",
        limit=10,
        export="",
    )
コード例 #2
0
def test_print_insider_data_no_table(mocker):
    # MOCK GET
    mocker.patch(target="requests.get")

    # MOCK BEAUTIFULSOUP
    mock_soup = mocker.Mock()
    mocker.patch.object(target=mock_soup, attribute="find", return_value=None)
    mocker.patch(
        target="gamestonk_terminal.stocks.insider.openinsider_view.BeautifulSoup",
        return_value=mock_soup,
    )

    openinsider_view.print_insider_data(
        type_insider="lip",
        limit=10,
        export="",
    )
コード例 #3
0
 def call_lit(self, other_args: List[str]):
     """Process latest-insider-trading"""
     return openinsider_view.print_insider_data(other_args, "lit")
コード例 #4
0
 def call_lpsb(self, other_args: List[str]):
     """Process latest-penny-stock-buys"""
     return openinsider_view.print_insider_data(other_args, "lpsb")
コード例 #5
0
 def call_lcb(self, other_args: List[str]):
     """Process latest-cluster-buys"""
     return openinsider_view.print_insider_data(other_args, "lcb")