diff --git a/tests/data/discovery_short_interest_api.yaml b/tests/data/discovery_short_interest_api.yaml new file mode 100755 index 00000000000..ad58834d8aa --- /dev/null +++ b/tests/data/discovery_short_interest_api.yaml @@ -0,0 +1,1258 @@ +test_high_short_interest: + base_high_short: + mock_high_short: | + + + + + High Short Interest Stocks + + + + + + + + + + + + + + +
+ +

High Short Interest Stocks

+ +

HighShortInterest.com provides a convenient sorted database of stocks which have a short interest of over 20 percent. Additional key data such as the float, number of outstanding shares, and company industry is displayed. Data is presented for the Nasdaq Stock Market, the New York Stock Exchange, and the American Stock Exchange. You can view the data for all exchanges together or only view exchanges of interest by clicking on the appropriate tab.

+ +

Stocks with high short interest are often very volatile and are well known for making explosive upside moves (known as a short squeeze). Stock traders will often flock to such stocks for no reason other than the fact that they have a high short interest and the price can potentially move up very quickly as traders with open short positions move to cover.

+ +

Disclaimer: We have made our best effort to provide accurate data, but always do your own research and double check the information presented here before making an investment.

+

+ +
+



+

+
AllNasdaqNYSEAMEXLow Float StocksPenny Stocks
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TickerCompanyExchangeShortIntFloatOutstdIndustry
OTRKOntrak, Inc.Nasdaq43.33%7.53M17.69MHealthcare Facilities
BLNKBlink Charging CoNasdaq41.94%31.69M38.95MUtilities - Electric
ROOTRoot IncNasdaq41.66%26.62M59.66MInsurance - Multiline & Brokers
GOGOGogo IncNasdaq40.74%38.90M86.40MCommunications Services
GTTGTT Communications IncNYSE40.29%25.15M58.82MIT Services & Consulting
ASOAcademy Sports & Outdoors IncNasdaq39.91%31.34M89.91MRetailers - Apparel & Accessories
TRITTriterras IncNasdaq35.34%23.25M83.20MFintech
CLVSClovis Oncology IncNasdaq33.85%101.89M104.53MBiotechnology & Drugs
HPRHighPoint Resources CorpNYSE32.78%2.21M4.31MOil & Gas - Exploration and Production
GSXGSX Techedu IncNYSE32.65%128.57M254.69MPersonal Services
SENSSenseonics Holdings IncAMEX31.40%219.11M377.88MMedical Equipment & Supplies
MDGLMadrigal Pharmaceuticals IncNasdaq30.69%8.03M15.44MBiotechnology & Medical Research
SDCSmileDirectClub IncNasdaq30.55%101.05M117.37MMedical Equipment, Supplies & Distribution
AXDXAccelerate Diagnostics IncNasdaq28.49%31.17M59.33MScientific & Technical Instruments
REVRevlon IncNYSE28.17%6.74M53.34MPersonal & Household Products
ICPTIntercept Pharmaceuticals IncNasdaq26.59%27.24M33.02MBiotechnology & Medical Research
RUBYRubius Therapeutics IncNasdaq26.40%35.93M88.08MBiotechnology & Medical Research
SKTTanger Factory Outlet CentersNYSE26.37%89.76M93.57MReal Estate Operations
FUBOFubotv IncNYSE26.10%69.50M67.56MOnline Services
INOInovio Pharmaceuticals IncNasdaq26.01%204.08M207.63MBiotechnology & Medical Research
PGENPrecigen, IncNasdaq25.88%90.09M178.60MBiotechnology & Medical Research
TRTootsie Roll Industries, Inc.NYSE25.67%14.91M40.52MFood Processing
MSTRMicroStrategy IncNasdaq25.59%7.06M7.62MSoftware & Programming
BYNDBeyond Meat IncNasdaq25.52%43.53M62.94MFood Processing
WKHSWorkhorse Group IncNasdaq25.49%116.18M123.51MAuto & Truck Manufacturers
+
PRTSCarparts.Com IncNasdaq25.22%35.23M48.09MRetailers - Auto Vehicles, Parts & Service
CVNACarvana CoNYSE24.89%67.53M78.33MRetail (Specialty Non-Apparel)
RVPRetractable Technologies, Inc.AMEX24.85%14.71M33.82MMedical Equipment, Supplies & Distribution
MACMacerich CoNYSE24.37%146.11M149.47MREITs - Commercial
LCILannett Company, Inc.NYSE24.31%32.17M41.40MBiotechnology & Drugs
KPTIKaryopharm Therapeutics IncNasdaq24.26%63.06M74.63MBiotechnology & Medical Research
OPKOpko Health Inc.Nasdaq24.14%383.89M670.04MBiotechnology & Drugs
GMEGameStop Corp.NYSE24.10%42.29M69.75MRetail (Technology)
EBIXEbix, Inc.Nasdaq23.53%25.32M30.96MComputer Networks
BFIBurgerfi International IncNasdaq23.04%4.02M17.44MRestaurants & Bars
HJLIHancock Jaffe Laboratories IncNasdaq22.84%1.71M7.73MMedical Equipment, Supplies & Distribution
SRNESorrento Therapeutics IncNasdaq22.76%242.64M280.86MBiotechnology & Medical Research
SPWRSunPower CorporationNasdaq22.74%81.43M170.56MSemiconductors
KOSSKoss CorpNasdaq22.33%4.24M8.62MAudio & Video Equipment
OMEROmeros CorporationNasdaq22.30%59.18M61.93MBiotechnology & Drugs
VXRTVaxart IncNasdaq22.04%117.06M117.77MBiotechnology & Medical Research
BBBYBed Bath & Beyond Inc.Nasdaq21.97%114.09M126.01MRetail (Specialty Non-Apparel)
DVAXDynavax Technologies CorporatiNasdaq21.63%113.50M113.26MBiotechnology & Medical Research
KDMNKadmon Holdings IncNYSE21.25%165.35M171.82MPharmaceuticals
DKSDicks Sporting Goods IncNYSE21.16%59.03M65.73MRetailers - Other Specialty
CVMCEL-SCI CorporationAMEX21.10%38.86M40.53MBiotechnology & Medical Research
CRTXCortexyme IncNasdaq20.98%15.36M29.50MBiotechnology & Medical Research
FBRXForte Biosciences IncNasdaq20.90%1.48M13.51MBiotechnology & Medical Research
PETSPetmed Express IncNasdaq20.70%19.59M20.27MRetail (Drugs)
IRBTiRobot CorporationNasdaq20.58%27.51M28.20MElectronic Equipment & Parts
+
+ + + + + +
Pages:12Next
+
+ Database last updated on March 26, 2021
+ + + + + + + + + + + expected_result: "banana" +test_low_float: + base_low_float: + mock_low_float: | + + + + + Low Float Stocks + + + + + + + + + + + + + + +
+ +

Low Float Stocks

+ +

LowFloat.com provides a convenient sorted database of stocks which have a float of under 10 million shares. Additional key data such as the number of outstanding shares, short interest, and company industry is displayed. Data is presented for the Nasdaq Stock Market, the New York Stock Exchange, the American Stock Exchange, and the Over the Counter Bulletin Board. You can view the data for all exchanges together or only view exchanges of interest by clicking on the appropriate tab.

+ +

Low float stocks are often very volatile and are well known for making explosive upside moves. Stock traders will often flock to such stocks for no reason other than the fact that they have a low float and the price can potentially move up very quickly.

+

Disclaimer: We have made our best effort to provide accurate data, but always do your own research and double check the information presented here before making an investment.

+

+ +
+



+

+
AllAll (with OTCBB)NasdaqNYSEAMEXOTCBBHigh Short Interest StocksPenny Stocks
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TickerCompanyExchangeFloatOutstdShortIntIndustry
DITAmcon Distributing CoAMEX150K550K0.30%Retail (Grocery)
SEBSeaboard CorpAMEX240K1.16M0.71%Fish/Livestock
HMGHMG Courtland PropertiesAMEX280K1.01M0.01%Real Estate Operations
BDLFlanigan's Enterprises IncAMEX380K1.86M0.11%Restaurants
MAYSJW Mays IncNasdaq390K2.02M0.80%Real Estate Operations
SENEBSeneca Foods CorpNasdaq460K1.72M0.07%Food Processing
PNRGPrimeEnergy CorpNasdaq490K1.99M1.90%Oil & Gas Operations
COHNCohen & Company IncAMEX500K1.33M1.23%Diversified Investment Services
VBFCVillage Bank and Trust Financial CorpNasdaq530K1.47M0.07%Regional Banks
MDLYMedley Management IncNYSE620K670K13.84%Investment Services
RANDRand Capital CorpNasdaq640K2.58M0.01%Misc. Financial Services
CVRChicago Rivet & Machine CoAMEX780K970K0.03%Misc. Fabricated Products
INTGIntergroup CorpNasdaq780K2.28M0.30%Real Estate Operations
QADBQAD, Inc.Nasdaq780K3.33M0.19%Software & Programming
CARVCarver Bancorp IncNasdaq790K3.33M12.71%S&Ls/Savings Banks
ARLAmerican Realty Investors, IncNYSE800K16.00M7.45%Real Estate Operations
IKNXIkonics CorpNasdaq830K1.98M0.67%Photography
AAMCAltisource Asset Management CoAMEX910K2.05M0.10%Investment Services
VALUValue Line IncNasdaq950K9.57M1.36%Investment Services
MXCMexco Energy CorpAMEX960K2.05M2.92%Oil & Gas Operations
FFDFFFD Financial CorpNasdaq980K990K0.00%S&Ls/Savings Banks
VRTAVestin Realty Mortgage I IncNasdaq1.01M1.30M0.00%Real Estate Operations
SQBGSequential Brands Group IncNasdaq1.02M1.65M6.33%Retailers - Apparel & Accessories
SVTServotronics IncNYSE1.04M2.49M0.14%Personal & Household Products
LINKInterlink Electronics IncNasdaq1.06M6.60M0.00%Electronic Instruments & Controls
DJCODaily Journal CorpNasdaq1.08M1.38M1.06%Printing & Publishing
NSECNational Security Group IncNasdaq1.08M2.53M0.01%Insurance (Life)
ISIGInsignia Systems, Inc.Nasdaq1.09M1.75M4.36%Advertising & Marketing
EDRYEuroDry LtdNasdaq1.09M2.35M1.27%Water Transportation
TSRITSR IncNasdaq1.10M1.96M0.05%Software & Programming
+
FFHLFuwei Films Holdings Co LtdNasdaq1.13M3.27M1.16%Fabricated Plastic & Rubber
GTECGreenland Technologies HoldingNasdaq1.13M10.16M12.23%Auto, Truck & Motorcycle Parts
HFBLHome Federal Bancorp Inc of LANasdaq1.15M1.69M0.01%S&Ls/Savings Banks
LBPS4D Pharma PLCNasdaq1.16M2.63M0.80%Pharmaceuticals
ELTKEltek LtdNasdaq1.17M4.38M0.10%Electronic Instruments & Controls
BNSOBonso Electronic International IncNasdaq1.17M4.89M0.09%Misc. Capital Goods
NSYSNortech Systems IncNasdaq1.18M2.66M0.48%Electronic Instruments & Controls
WAFUWah Fu Education Group LtdNasdaq1.18M4.38M1.30%Personal Services
OFEDOconee Federal FinancialNasdaq1.19M5.60M1.08%S&Ls/Savings Banks
ACYAeroCentury CorpAMEX1.20M1.55M3.09%Rental & Leasing
AEIAlset Ehome International IncNasdaq1.23M8.57M1.76%Construction & Engineering
MTEXMannatech,Inc.Nasdaq1.24M2.07M0.13%Biotechnology & Drugs
KSPNKaspien Holdings, IncNasdaq1.25M2.43M0.72%Retailers - Other Specialty
QBAKQualstar CorpNasdaq1.29M1.93M0.00%Computer Storage Devices
LIVELive Ventures IncNasdaq1.32M1.56M0.55%Computer Services
PNBKPatriot National Bancorp IncNasdaq1.32M3.94M1.42%Regional Banks
TCITranscontinental Realty InvestorsNYSE1.33M8.72M1.68%Real Estate Operations
DXRDaxor CorpAMEX1.35M4.09M1.45%Healthcare Facilities
HIFSHingham Institution for SavingsNasdaq1.36M2.14M1.67%S&Ls/Savings Banks
CKXCKX Lands IncAMEX1.38M1.94M0.20%Oil & Gas Operations
+ + + + + + + + + + + + + +
Pages:12345678910Next
+
+ Database last updated on March 26, 2021
+ + + + + + + + + + + expected_result: "banana" \ No newline at end of file diff --git a/tests/test_discovery_short_interest_api.py b/tests/test_discovery_short_interest_api.py index 4fb72201814..ced87574ca0 100644 --- a/tests/test_discovery_short_interest_api.py +++ b/tests/test_discovery_short_interest_api.py @@ -1,15 +1,40 @@ """ discovery/short_interest_api.py tests """ import unittest +from unittest import mock + +# pylint: disable=unused-import +from gamestonk_terminal.test_helper import ( # noqa: F401 + parameterize_from_file, + pytest_generate_tests, +) from gamestonk_terminal.discovery.short_interest_api import ( high_short_interest, low_float, ) +assertions = unittest.TestCase("__init__") -class TestDiscoveryShortInterestApi(unittest.TestCase): - def test_high_short_interest(self): + +class TestDiscoveryShortInterestApi: + @mock.patch("gamestonk_terminal.discovery.short_interest_api.requests") + @parameterize_from_file( + "test_high_short_interest", + "../tests/data/discovery_short_interest_api.yaml", + ) + # pylint: disable=unused-argument + def test_high_short_interest( + self, mock_request_get, mock_high_short, expected_result + ): + mock_request_get.get().text = mock_high_short high_short_interest(["-n", "10"]) - def test_low_float(self): + @mock.patch("gamestonk_terminal.discovery.short_interest_api.requests") + @parameterize_from_file( + "test_low_float", + "../tests/data/discovery_short_interest_api.yaml", + ) + # pylint: disable=unused-argument + def test_low_float(self, mock_request_get, mock_low_float, expected_result): + mock_request_get.get().text = mock_low_float low_float(["-n", "10"])