Ejemplo n.º 1
0
 def setUp(self):
     self.user = User.objects.create_user('testdude','*****@*****.**','password')
     self.user.save()
     now = datetime.utcnow()
     self.hunts = [
         make_hunt(self.user, 'future hunt', 'future',   start=now + timedelta(1)),
         make_hunt(self.user, 'current hunt', 'current', start=now),
         make_hunt(self.user, 'voting hunt', 'voting',   start=now - timedelta(hours=2),
                        end_delta=timedelta(hours=1),
                        vote_delta=timedelta(hours=2)),
         make_hunt(self.user, 'finished hunt', 'finished', start=now - timedelta(hours=2),
                        end_delta=timedelta(hours=1))
     ]
Ejemplo n.º 2
0
 def setUp(self):
     self.user = User.objects.create_user('testdude','*****@*****.**','password')
     self.user.save()
     self.hunt = make_hunt(self.user,
                          'first test hunt',
                          'firsttest',
                          datetime.utcnow(),
                          vote_delta=timedelta(hours=1))
Ejemplo n.º 3
0
    def setUp(self):
        self.before = (datetime.utcnow() - timedelta(hours=1)).replace(tzinfo=pytz.utc)
        # Two users
        self.public_user = User.objects.create_user('publicguy','*****@*****.**','password')
        self.public_user.save()
        self.private_user = User.objects.create_user('privateguy', '*****@*****.**', 'password')
        self.private_user.save()
        profile = self.private_user.get_profile()
        profile.public_activity=False
        profile.save()

        self.public_hunt = make_hunt(self.public_user,
                             'public test hunt',
                             'publictest',
                             datetime.utcnow(),
                             vote_delta=timedelta(hours=1))
        self.private_hunt = make_hunt(self.private_user,
                             'private test hunt',
                             'privatetest',
                             datetime.utcnow(),
                             vote_delta=timedelta(hours=1))
Ejemplo n.º 4
0
 def setUp(self):
     self.user = User.objects.create_user('testdude','*****@*****.**','password')
     self.user.save()
     # Create a hunt
     self.hunt = make_hunt(self.user, 'test email hunt', 'emailtest', datetime.utcnow())