def setUp(self):
        # make sure cache is clean, to prevent some failing tests with
        # unexpected caches
        from django.core.cache import cache

        cache.clear()

        d = datetime.date.today()

        self.knesset = Knesset.objects.create(
            number=1,
            start_date=d-datetime.timedelta(10))
        self.party_1 = Party.objects.create(name='party 1',
                                            knesset=self.knesset)
        self.party_2 = Party.objects.create(name='party 2',
                                            knesset=self.knesset)
        self.mk_1 = Member.objects.create(name='mk_1',
                                          start_date=datetime.date(2010,1,1),
                                          current_party=self.party_1,
                                          backlinks_enabled=True)
        self.mk_2 = Member.objects.create(name='mk_2',
                                          start_date=datetime.date(2010,1,1),
                                           current_party=self.party_1,
                                           backlinks_enabled = False)
        self.jacob = User.objects.create_user('jacob', 'jacob@jacobian.org',
                                              'JKM')

        self.committee_1 = Committee.objects.create(name='c1')
        self.meeting_1 = self.committee_1.meetings.create(
            date=datetime.timedelta(1)-d,
            protocol_text='jacob:\nI am a perfectionist\nadrian:\nI have a deadline')
        self.meeting_2 = self.committee_1.meetings.create(
            date=d-datetime.timedelta(2),
            protocol_text='adrian:\nYou are a perfectionist\njacob:\nYou have a deadline')
        self.law = Law.objects.create(title='law 1')
        self.pp = PrivateProposal.objects.create(title='private proposal 1', date=datetime.date.today()-datetime.timedelta(3))
        self.pp.proposers.add(self.mk_1)
        self.bill_1 = Bill.objects.create(stage='1', title='bill 1', law=self.law)
        self.bill_1.proposals.add(self.pp)
        self.bill_1.proposers.add(self.mk_1)
        self.meeting_1.mks_attended.add(self.mk_1)
        self.meeting_1.save()
        self.meeting_2.mks_attended.add(self.mk_1)
        self.meeting_2.save()
        self.vote = Vote.objects.create(title='vote 1',time=datetime.datetime.now())
        self.vote_action = VoteAction.objects.create(member=self.mk_1, vote=self.vote, type='for', party=self.mk_1.current_party)
        self.domain = 'http://' + Site.objects.get_current().domain
dataset/ETHPy150Open ofri/Open-Knesset/mks/tests.py/MemberViewsTest.setUp/swapped operands of `-`