def test_user_actions(self): # Get a day on which a random user has done some work last_week = datetime.date.today() - datetime.timedelta(days=7) h = pymaid.get_history(start_date=last_week, end_date=datetime.date.today()) u = h.treenodes.loc[h.treenodes.sum(axis=1) > 10].sample(1).index[0] user_actions = pymaid.get_user_actions(users=u, start_date=last_week, end_date=datetime.date.today()) self.assertIsInstance(user_actions, pd.DataFrame)
def test_get_history(self): self.assertIsInstance(pymaid.get_history( remote_instance=self.rm), pd.Series)