Permalink
Browse files

Readme amended. Test for the award released.

  • Loading branch information...
1 parent 9850e5d commit 0fbfd024c30065b464150879693b24e167ebedbe @alfredo alfredo committed Jul 4, 2012
Showing with 13 additions and 2 deletions.
  1. +2 −2 README.md
  2. +9 −0 apps/awards/tests/test_views.py
  3. +2 −0 apps/awards/views.py
View
@@ -13,7 +13,7 @@ Contributing
Patches are welcome! Feel free to fork and contribute to this project on
[github][gh-betafarm].
-[gh-betafarm]: https://github.com/rossbruniges/mozilla-ignite
+[gh-betafarm]: https://github.com/mozilla/mozilla-ignite
Installation
@@ -27,7 +27,7 @@ Getting the source code
Clone the repository and its dependencies:
- git clone --recursive git@github.com:rossbruniges/mozilla-ignite.git
+ git clone --recursive git@github.com:mozilla/mozilla-ignite.git
This will take a few minutes.
@@ -223,6 +223,15 @@ def test_judge_request_not_allowance(self):
response = self.client.post(self.award_url, data)
self.assertEqual(response.status_code, 404)
+ def test_judge_request_award_not_released(self):
+ self.client.login(username='bob', password='bob')
+ self.create_allowance()
+ self.phase_award.status = Award.PENDING
+ self.phase_award.save()
+ data = {'amount': 100}
+ response = self.client.post(self.award_url, data)
+ self.assertEqual(response.status_code, 404)
+
def test_judge_allocation_non_qualifying_submission(self):
self.client.login(username='bob', password='bob')
self.create_allowance()
@@ -1,5 +1,6 @@
from awards.forms import AwardForm
from awards.models import JudgeAllowance
+from awards.models import Award
from challenges.decorators import judge_required
from challenges.models import Submission
from django.contrib import messages
@@ -23,6 +24,7 @@ def award(request, submission_id, project=None, slug=None):
judge_data = {
'judge': request.user.get_profile(),
'award__phase': submission.phase,
+ 'award__status': Award.RELEASED,
}
if submission.phase_round:
judge_data.update({'award__phase_round': submission.phase_round})

0 comments on commit 0fbfd02

Please sign in to comment.