Esempio n. 1
0
    def test_not_empty_result(self):
        df = stock.get_shorting_investor_volume_by_date(
            "20190401", "20190405", "KOSPI")
        self.assertNotEqual(df.empty, True)

        df = stock.get_shorting_investor_price_by_date("20190401", "20190405",
                                                       "KOSPI")
        self.assertNotEqual(df.empty, True)

        df = stock.get_shorting_volume_top50("20190401", "KOSPI")
        self.assertNotEqual(df.empty, True)

        df = stock.get_shorting_balance_top50("20190401", "KOSPI")
        self.assertNotEqual(df.empty, True)
Esempio n. 2
0
 def test_in_kosdaq_1(self):
     df = stock.get_shorting_volume_top50("20200106", "KOSDAQ")
     self.assertIsInstance(df, pd.DataFrame)
     self.assertTrue(len(df), 50)
Esempio n. 3
0
 def test_with_holiday(self):
     # 20200105 sunday
     df = stock.get_shorting_volume_top50("20200105")
     self.assertIsInstance(df, pd.DataFrame)
     self.assertTrue(df.empty)
Esempio n. 4
0
 def test_with_default_param(self):
     df = stock.get_shorting_volume_top50("20200106")
     self.assertIsInstance(df, pd.DataFrame)
     self.assertTrue(len(df), 50)