Esempio n. 1
0
 def test_params_reset_after_get_cik(self, ticker_lookups, client):
     validator = _CIKValidator(lookups=ticker_lookups, client=client)
     validator._get_cik(ticker_lookups[0])
     assert validator.params.get("CIK") is None
     assert validator.params.get("company") is None
Esempio n. 2
0
 def test_lookups_property(self, ticker_lookups):
     validator = _CIKValidator(lookups=ticker_lookups)
     assert validator.lookups == ticker_lookups
Esempio n. 3
0
 def test_client_property(self, client, ticker_lookups):
     validator = _CIKValidator(ticker_lookups, client=client)
     assert validator.client == client
Esempio n. 4
0
 def test_empty_lookups_raises_type_error(self, bad_lookups, expected):
     with expected:
         _CIKValidator(lookups=bad_lookups)
Esempio n. 5
0
 def __init__(self, lookups, **kwargs):
     super(CIKLookup, self).__init__(**kwargs)
     self._validator = _CIKValidator(lookups)
     # TODO: Differ validation until later?
     self._lookup_dict = None
     self._ciks = None