diff contests/tests/test_views.py @ 796:5977b43499f7

Modified contests to have multiple winners.
author Brian Neal <bgneal@gmail.com>
date Fri, 04 Jul 2014 20:30:14 -0500
parents 8789299c75b1
children
line wrap: on
line diff
--- a/contests/tests/test_views.py	Fri Jun 06 18:28:28 2014 -0500
+++ b/contests/tests/test_views.py	Fri Jul 04 20:30:14 2014 -0500
@@ -39,9 +39,11 @@
                 is_public=True,
                 creation_date=start,
                 end_date=end,
-                winner=user,
-                win_date=end + datetime.timedelta(days=1))
+                win_date=end + datetime.timedelta(days=1),
+                num_winners=1)
         c.save()
+        c.contestants.add(user)
+        c.winners.add(user)
         self.contest_id = c.id
 
     def test_contests(self):
@@ -72,7 +74,8 @@
                 description='test',
                 is_public=True,
                 creation_date=start,
-                end_date=end)
+                end_date=end,
+                num_winners=1)
         c.save()
         self.contest_id = c.id