Commit dbd804676c6682c0f1669a6eca63484f98be1201
Exists in
master
and in
5 other branches
Merge branch 'master' of https://github.com/amadeusproject/amadeuslms
Showing
3 changed files
with
20 additions
and
6 deletions
Show diff stats
courses/tests/test_views.py
... | ... | @@ -6,6 +6,7 @@ from django.core.urlresolvers import reverse |
6 | 6 | from rolepermissions.shortcuts import assign_role |
7 | 7 | |
8 | 8 | from courses.models import Course, Category |
9 | +from courses.forms import CourseForm | |
9 | 10 | from users.models import User |
10 | 11 | |
11 | 12 | class CourseViewTestCase(TestCase): |
... | ... | @@ -98,14 +99,16 @@ class CourseViewTestCase(TestCase): |
98 | 99 | |
99 | 100 | |
100 | 101 | def test_update(self): |
102 | + | |
101 | 103 | self.client.login(username = 'test', password = 'testing') |
102 | 104 | |
103 | - url = reverse('course:update', kwargs = {'slug': self.course.slug}) | |
105 | + url = reverse('course:update', kwargs = {'slug': self.course.slug}) | |
106 | + data = Course.objects.get(name="Curso Teste") | |
107 | + data.name = "Curse Test" | |
104 | 108 | |
105 | - response = self.client.get(url) | |
106 | - | |
107 | - self.assertEquals(response.status_code, 200) | |
108 | - self.assertTemplateUsed(response, 'course/update.html') | |
109 | + response = self.client.put(url, data, format='json') | |
110 | + self.assertEqual(response.status_code, 200) | |
111 | + # self.assertEqual(response.data, data.name) | |
109 | 112 | |
110 | 113 | def test_update_not_logged(self): |
111 | 114 | url = reverse('course:update', kwargs = {'slug': self.course.slug}) | ... | ... |
logs/log_file_05-09-2016.txt
... | ... | @@ -42,10 +42,11 @@ |
42 | 42 | 05/09/2016 04:39:39 - test - Entrou no sistema |
43 | 43 | 05/09/2016 04:39:39 - test - Acessou home |
44 | 44 | 05/09/2016 04:40:28 - matheuslins - Acessou home |
45 | +05/09/2016 15:14:48 - matheuslins - Acessou home | |
45 | 46 | 05/09/2016 15:28:49 - zambom - Acessou home |
46 | 47 | 05/09/2016 15:29:02 - zambom - Entrou no sistema |
47 | 48 | 05/09/2016 15:29:02 - zambom - Acessou home |
48 | 49 | 05/09/2016 15:31:13 - zambom - Entrou no sistema |
49 | 50 | 05/09/2016 15:31:13 - zambom - Acessou home |
50 | 51 | 05/09/2016 20:20:12 - admin - Entrou no sistema |
51 | 52 | -05/09/2016 20:20:13 - admin - Acessou home |
53 | +05/09/2016 20:20:13 - admin - Acessou home | |
52 | 54 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,10 @@ |
1 | +07/09/2016 17:10:46 - matheuslins - Entrou no sistema | |
2 | +07/09/2016 17:10:46 - matheuslins - Acessou home | |
3 | +07/09/2016 17:10:58 - matheuslins - Acessou home | |
4 | +07/09/2016 17:12:12 - matheuslins - Acessou home | |
5 | +07/09/2016 17:12:15 - matheuslins - Acessou home | |
6 | +07/09/2016 17:12:24 - matheuslins - Acessou home | |
7 | +07/09/2016 17:17:16 - matheuslins - Entrou no sistema | |
8 | +07/09/2016 17:17:16 - matheuslins - Acessou home | |
9 | +07/09/2016 17:24:09 - test - Entrou no sistema | |
10 | +07/09/2016 17:24:09 - test - Acessou home | ... | ... |