def test_read_data_screen(self, mock1): search = {'count': 200, 'screen_name': 'johndoe', 'since_id': 1} t = self.create_twitter(tag='', screen='johndoe', fav=False) kwargs = dict({'date_triggered': '2013-05-11 13:23:58+00:00', 'model_name': 'Twitter', 'trigger_id': t.trigger_id}) se = ServiceTwitter(self.token) se.read_data(**kwargs) mock1.assert_called_with(**search)
def test_read_data_screen(self, mock1): search = {'count': 200, 'screen_name': 'johndoe', 'since_id': 1} t = self.create_twitter(tag='', screen='johndoe') kwargs = dict({'date_triggered': '2013-05-11 13:23:58+00:00', 'model_name': 'Twitter', 'trigger_id': t.trigger_id}) se = ServiceTwitter(self.token) se.read_data(**kwargs) mock1.assert_called_with(**search)
def test_read_data_tag(self, mock1): t = self.create_twitter(tag='twitter', screen='') search = {'count': 100, 'q': 'twitter', 'result_type': 'recent', 'since_id': 1} kwargs = dict({'date_triggered': '2013-05-11 13:23:58+00:00', 'model_name': 'Twitter', 'trigger_id': t.trigger_id}) se = ServiceTwitter(self.token) se.read_data(**kwargs) mock1.assert_called_with(**search)