mirror of
https://github.com/bspeice/metrik
synced 2025-07-02 06:16:39 -04:00
Add NASDAQ Company and ETF lists
This commit is contained in:
@ -2,7 +2,7 @@ from unittest import TestCase
|
||||
from pymongo import MongoClient
|
||||
|
||||
from metrik.conf import MONGO_DATABASE, MONGO_PORT, MONGO_HOST
|
||||
from metrik.targets.mongo_target import MongoTarget
|
||||
from metrik.targets.mongo import MongoTarget
|
||||
|
||||
|
||||
class MongoTest(TestCase):
|
||||
|
@ -1,7 +1,7 @@
|
||||
from pymongo import MongoClient
|
||||
from random import randint
|
||||
|
||||
from metrik.targets.mongo_target import MongoTarget
|
||||
from metrik.targets.mongo import MongoTarget
|
||||
from metrik.conf import MONGO_DATABASE, MONGO_HOST, MONGO_PORT
|
||||
from test.mongo_test import MongoTest
|
||||
|
||||
|
9
test/targets/test_noop.py
Normal file
9
test/targets/test_noop.py
Normal file
@ -0,0 +1,9 @@
|
||||
from unittest import TestCase
|
||||
|
||||
from metrik.targets.noop import NoOpTarget
|
||||
|
||||
|
||||
class NoOpTest(TestCase):
|
||||
def test_sanity(self):
|
||||
t = NoOpTarget()
|
||||
assert t.exists()
|
17
test/tasks/test_nasdaq.py
Normal file
17
test/tasks/test_nasdaq.py
Normal file
@ -0,0 +1,17 @@
|
||||
from unittest import TestCase
|
||||
|
||||
from metrik.tasks.nasdaq import NasdaqCompanyList, NasdaqETFList
|
||||
|
||||
|
||||
class NasdaqTest(TestCase):
|
||||
|
||||
def test_company_list(self):
|
||||
companies = NasdaqCompanyList.retrieve_data()['companies']
|
||||
assert len(companies) > 6000
|
||||
# TODO: Get lists of companies from ETF holdings and verify that they
|
||||
# can be found here as well - this should be a superset
|
||||
|
||||
|
||||
def test_etf_list(self):
|
||||
etfs = NasdaqETFList.retrieve_data()['etfs']
|
||||
assert len(etfs) > 1500
|
Reference in New Issue
Block a user