Commit 90bfb5c95b883914e070e6d2d68d25a225ed6cba

Authored by filipecmedeiros
1 parent 1e91686d

Link migration

forum/tests/test_view_forum.py
... ... @@ -120,22 +120,16 @@ class ForumViewTestCase (TestCase):
120 120 self.assertEquals(response.status_code, 200)
121 121  
122 122 response = self.client_professor.get(url)
123   - self.assertEquals(response.status_code, 200)
  123 + self.assertEquals(response.status_code, 302)
124 124  
125 125 response = self.client_student.get(url)
126   - self.assertEquals(response.status_code, 200)
  126 + self.assertEquals(response.status_code, 302)
127 127  
128 128 def test_ForumDetail_context(self):
129 129 url = reverse('course:forum:view', kwargs={'slug':self.forum.slug})
130 130  
131 131 response = self.client.get(url)
132   - self.assertTrue('forum' in response.context)
133   -
134   - response = self.client_professor.get(url)
135   - self.assertTrue('forum' in response.context)
136   -
137   - response = self.client_student.get(url)
138   - self.assertTrue('forum' in response.context)
  132 + self.assertTrue('form' in response.context)
139 133  
140 134  
141 135 ######################### CreateForumView #########################
... ...
links/migrations/0002_link_image.py 0 → 100644
... ... @@ -0,0 +1,20 @@
  1 +# -*- coding: utf-8 -*-
  2 +# Generated by Django 1.10 on 2016-10-28 18:34
  3 +from __future__ import unicode_literals
  4 +
  5 +from django.db import migrations, models
  6 +
  7 +
  8 +class Migration(migrations.Migration):
  9 +
  10 + dependencies = [
  11 + ('links', '0001_initial'),
  12 + ]
  13 +
  14 + operations = [
  15 + migrations.AddField(
  16 + model_name='link',
  17 + name='image',
  18 + field=models.ImageField(blank=True, upload_to='links/'),
  19 + ),
  20 + ]
... ...