Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1146 from akatsoulas/1102290-contribute
Browse files Browse the repository at this point in the history
[bug 1102290] Add test for contribute.json.
  • Loading branch information
akatsoulas committed Jan 8, 2015
2 parents e03923f + 2f041d2 commit 1a049d2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions mozillians/humans/tests/test_views.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import json

from django.conf import settings
from django.core.urlresolvers import reverse
from django.test.client import Client
Expand All @@ -13,3 +15,13 @@ def test_base(self):
response = client.get(reverse('humans:humans'))
eq_(response.status_code, 302)
ok_(settings.HUMANSTXT_URL in response._headers['location'][1])


class TestContribute(TestCase):
def test_base(self):
client = Client()
response = client.get(reverse('humans:contribute-view'))
eq_(response.status_code, 200)
ok_(json.loads(response.content))
eq_(response['Content-Type'], 'application/json')
self.assertTemplateUsed(response, 'humans/contribute.json')

0 comments on commit 1a049d2

Please sign in to comment.