예제 #1
0
파일: tests.py 프로젝트: paulcwatts/1hph
 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))
     ]
예제 #2
0
파일: tests.py 프로젝트: paulcwatts/1hph
 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))
예제 #3
0
파일: tests.py 프로젝트: paulcwatts/1hph
    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))
예제 #4
0
파일: tests.py 프로젝트: paulcwatts/1hph
 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())