SHOW:
|
|
- or go back to the newest paste.
1 | class EventsPageTest(GSoCDjangoTestCase): | |
2 | """Tests the events page.""" | |
3 | ||
4 | def setUp(self): | |
5 | self.init() | |
6 | self.data.createUser() | |
7 | ||
8 | def testEventsPageLoads(self): | |
9 | url = '/gsoc/events/%s' % self.gsoc.key().name() | |
10 | response = self.get(url) | |
11 | key_name = 'gsoc_program/'+self.sponsor.key().name()+'/'+self.program.key().name()+'/events_page' | |
12 | self.assertResponseOK(response) | |
13 | self.assertGSoCTemplatesUsed(response) | |
14 | self.assertTemplateUsed(response, 'v2/modules/gsoc/document/events.html') | |
15 | self.assertEqual(response.context['page_name'],'Events and Timeline') | |
16 | ||
17 | - | self.document = self.createDocument() |
17 | + | |
18 | 'prefix': 'gsoc_program', 'scope': self.gsoc, 'link_id': 'events_page', | |
19 | 'key_name': key_name,'modified_by': self.data.user, | |
20 | 'home_for': None, 'author': self.data.user, 'is_featured': None, | |
21 | 'write_access': 'admin', 'read_access': 'public', | |
22 | 'dashboard_visibility': ['student', 'mentor'], | |
23 | 'content': 'test_content', | |
24 | } | |
25 | properties = seeder_logic.seed_properties(Document, properties=override) | |
26 | self.document = self.createDocument(properties) | |
27 | response = self.get(url) | |
28 | print response | |
29 | self.assertTemplateUsed(response, 'v2/modules/gsoc/document/events.html') |