diff --git a/courses/tests/test_views.py b/courses/tests/test_views.py index 09dd495..c2b44cd 100644 --- a/courses/tests/test_views.py +++ b/courses/tests/test_views.py @@ -6,6 +6,7 @@ from django.core.urlresolvers import reverse from rolepermissions.shortcuts import assign_role from courses.models import Course, Category +from courses.forms import CourseForm from users.models import User class CourseViewTestCase(TestCase): @@ -98,14 +99,16 @@ class CourseViewTestCase(TestCase): def test_update(self): + self.client.login(username = 'test', password = 'testing') - url = reverse('course:update', kwargs = {'slug': self.course.slug}) + url = reverse('course:update', kwargs = {'slug': self.course.slug}) + data = Course.objects.get(name="Curso Teste") + data.name = "Curse Test" - response = self.client.get(url) - - self.assertEquals(response.status_code, 200) - self.assertTemplateUsed(response, 'course/update.html') + response = self.client.put(url, data, format='json') + self.assertEqual(response.status_code, 200) + # self.assertEqual(response.data, data.name) def test_update_not_logged(self): url = reverse('course:update', kwargs = {'slug': self.course.slug}) diff --git a/logs/log_file_05-09-2016.txt b/logs/log_file_05-09-2016.txt index bcb48e8..f85739c 100644 --- a/logs/log_file_05-09-2016.txt +++ b/logs/log_file_05-09-2016.txt @@ -42,3 +42,4 @@ 05/09/2016 04:39:39 - test - Entrou no sistema 05/09/2016 04:39:39 - test - Acessou home 05/09/2016 04:40:28 - matheuslins - Acessou home +05/09/2016 15:14:48 - matheuslins - Acessou home diff --git a/logs/log_file_07-09-2016.txt b/logs/log_file_07-09-2016.txt new file mode 100644 index 0000000..9515f31 --- /dev/null +++ b/logs/log_file_07-09-2016.txt @@ -0,0 +1,10 @@ +07/09/2016 17:10:46 - matheuslins - Entrou no sistema +07/09/2016 17:10:46 - matheuslins - Acessou home +07/09/2016 17:10:58 - matheuslins - Acessou home +07/09/2016 17:12:12 - matheuslins - Acessou home +07/09/2016 17:12:15 - matheuslins - Acessou home +07/09/2016 17:12:24 - matheuslins - Acessou home +07/09/2016 17:17:16 - matheuslins - Entrou no sistema +07/09/2016 17:17:16 - matheuslins - Acessou home +07/09/2016 17:24:09 - test - Entrou no sistema +07/09/2016 17:24:09 - test - Acessou home -- libgit2 0.21.2