def testQueryCachedCompanySymbolsWithNothingCached(self, engineFactoryMock):
    engineFactoryMock.return_value.execute.return_value.fetchall.return_value \
      = []

    symbols = agent._queryCachedCompanySymbols()

    self.assertSequenceEqual([], symbols)
Exemple #2
0
    def testQueryCachedCompanySymbolsWithNothingCached(self,
                                                       engineFactoryMock):
        engineFactoryMock.return_value.execute.return_value.fetchall.return_value \
          = []

        symbols = agent._queryCachedCompanySymbols()

        self.assertSequenceEqual([], symbols)
  def testQueryCachedCompanySymbols(self, engineFactoryMock):
    rows = [
      Mock(symbol="foo"),
      Mock(symbol="bar"),
    ]
    engineFactoryMock.return_value.execute.return_value.fetchall.return_value \
      = rows

    symbols = agent._queryCachedCompanySymbols()

    self.assertItemsEqual(["foo", "bar"], symbols)
Exemple #4
0
    def testQueryCachedCompanySymbols(self, engineFactoryMock):
        rows = [
            Mock(symbol="foo"),
            Mock(symbol="bar"),
        ]
        engineFactoryMock.return_value.execute.return_value.fetchall.return_value \
          = rows

        symbols = agent._queryCachedCompanySymbols()

        self.assertItemsEqual(["foo", "bar"], symbols)