def testLastWorkedSeveralProjects(self):
        self.login_user(self.user)
        project1 = self.project
        project2 = self.project2
        for day in range(0, 10):
            this_day = utils.add_timezone(datetime.datetime(2011, 1, 1))
            this_day += relativedelta(days=day)
            # Cycle through projects and activities
            project = project1 if day % 2 == 0 else project2
            activity = self.devl_activity if day % 3 == 0 else self.activity
            self.log_time(start=this_day, project=project, activity=activity)
        self.assertEqual(self.get_activity(project1), self.activity.id)
        self.assertEqual(self.get_activity(project2), self.devl_activity.id)
Obtain activities contingent on the project when worker is on several
dataset/ETHPy150Open caktus/django-timepiece/timepiece/entries/tests/test_timesheet.py/AutoActivityTest.testLastWorkedSeveralProjects