-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #440 from tjcsl/dev
Dev merge
- Loading branch information
Showing
137 changed files
with
577 additions
and
405 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,5 @@ __pycache__ | |
__pycache__/* | ||
localdata | ||
config/nginx/ldap_server.conf | ||
localdata/ | ||
fixtures/**/*.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from django.core.urlresolvers import reverse | ||
from ..users.models import Group, User | ||
|
||
from ...test.ion_test import IonTestCase | ||
|
||
|
||
class AnnouncementTest(IonTestCase): | ||
"""Tests for the announcements module.""" | ||
|
||
def test_get_announcements(self): | ||
self.login() | ||
response = self.client.get(reverse('view_announcements')) | ||
self.assertEqual(response.status_code, 200) | ||
response = self.client.get(reverse('view_announcement', args=[9001])) | ||
self.assertEqual(response.status_code, 404) | ||
|
||
def test_change_announcements(self): | ||
self.login() | ||
group = Group.objects.get_or_create(name="admin_all")[0] | ||
User.get_user(username='awilliam').groups.add(group) | ||
|
||
response = self.client.get(reverse('add_announcement')) | ||
self.assertEqual(response.status_code, 200) | ||
response = self.client.get(reverse('admin_approve_announcement', args=[9001])) | ||
self.assertEqual(response.status_code, 404) | ||
response = self.client.get(reverse('admin_request_status')) | ||
self.assertEqual(response.status_code, 200) | ||
response = self.client.get(reverse('approve_announcement', args=[9001])) | ||
self.assertEqual(response.status_code, 404) | ||
response = self.client.get(reverse('announcements_archive')) | ||
self.assertEqual(response.status_code, 200) | ||
response = self.client.get(reverse('delete_announcement', args=[9001])) | ||
self.assertEqual(response.status_code, 404) | ||
response = self.client.post(reverse('hide_announcement')) | ||
self.assertEqual(response.status_code, 404) | ||
response = self.client.get(reverse('modify_announcement', args=[9001])) | ||
self.assertEqual(response.status_code, 404) | ||
response = self.client.get(reverse('request_announcement')) | ||
self.assertEqual(response.status_code, 200) | ||
response = self.client.post(reverse('show_announcement')) | ||
self.assertEqual(response.status_code, 404) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.