Ejemplo n.º 1
0
 def test_not_agreed(self):
     # The user has never agreed to it so in this case we don't need to
     # worry them about changes.
     self.user.update(read_dev_agreement=None)
     with self.settings(
             DEV_AGREEMENT_LAST_UPDATED=self.days_ago(10).date()):
         eq_(helpers.dev_agreement_ok(self.user), True)
Ejemplo n.º 2
0
 def test_not_agreed(self):
     # The user has never agreed to it so in this case we don't need to
     # worry them about changes.
     self.user.update(read_dev_agreement=None)
     with self.settings(DEV_AGREEMENT_LAST_UPDATED=
                        self.days_ago(10).date()):
         eq_(helpers.dev_agreement_ok(self.user), True)
Ejemplo n.º 3
0
 def test_not_past(self):
     self.user.update(read_dev_agreement=self.days_ago(5))
     with self.settings(DEV_AGREEMENT_LAST_UPDATED=
                        self.days_ago(10).date()):
         eq_(helpers.dev_agreement_ok(self.user), True)
Ejemplo n.º 4
0
 def test_date_oops(self):
     with self.settings(DEV_AGREEMENT_LAST_UPDATED=('wat?')):
         eq_(helpers.dev_agreement_ok(self.user), True)
Ejemplo n.º 5
0
 def test_none(self):
     with self.settings(DEV_AGREEMENT_LAST_UPDATED=None):
         eq_(helpers.dev_agreement_ok(self.user), True)
Ejemplo n.º 6
0
 def test_not_past(self):
     self.user.update(read_dev_agreement=self.days_ago(5))
     with self.settings(
             DEV_AGREEMENT_LAST_UPDATED=self.days_ago(10).date()):
         eq_(helpers.dev_agreement_ok(self.user), True)
Ejemplo n.º 7
0
 def test_date_oops(self):
     with self.settings(DEV_AGREEMENT_LAST_UPDATED=('wat?')):
         eq_(helpers.dev_agreement_ok(self.user), True)
Ejemplo n.º 8
0
 def test_none(self):
     with self.settings(DEV_AGREEMENT_LAST_UPDATED=None):
         eq_(helpers.dev_agreement_ok(self.user), True)