def test_no_limits_exceeded(self): """ Tests the _factor_components method for a query that doesn't exceed any API limits on number of arguments. """ specs = PipeSpecSheet(searchterms_limit=10, locations_limit=10, followees_limit=10) engineer = Engineer(query=self.query, specs=specs) queries = engineer._factor_components([self.query]) self.assertEqual(len(queries), 1)
def test_exceeds_searchterms_limit(self): """ Tests the _factor_components method for a query that exceeds the API limit on number of terms. """ specs = PipeSpecSheet(searchterms_limit=1, locations_limit=10, followees_limit=10) engineer = Engineer(query=self.query, specs=specs) queries = engineer._factor_components([self.query]) self.assertEqual(len(queries), 3)