def testClockInManyActive(self):
        self.login_user(self.user)
        entry1 = factories.Entry(**{
            'user': self.user,
            'start_time': self.ten_min_ago,
        })
        entry2 = factories.Entry(**{
            'user': self.user,
            'start_time': self.now - relativedelta(minutes=20),
        })
        data = self.clock_in_form
        data.update({
            'start_time_0': self.now.strftime('%m/%d/%Y'),
            'start_time_1': self.now.strftime('%H:%M:%S'),
        })
        try:
            self.client.post(self.url, data)
        except utils.ActiveEntryError as e:
            self.assertEqual(str(e), "Only one active entry is allowed.")
        else:
            self.fail("Only one active entry should be allowed.")
        self.assertEqual(Entry.objects.count(), 2)
        self.assertEqual(Entry.objects.get(pk=entry1.pk), entry1)
        self.assertEqual(Entry.objects.get(pk=entry2.pk), entry2)
There should never be more than one active entry. If this happens,
dataset/ETHPy150Open caktus/django-timepiece/timepiece/entries/tests/test_timesheet.py/ClockInTest.testClockInManyActive