Skip to content

Instantly share code, notes, and snippets.

@gilsondev
Created November 24, 2011 19:35
Show Gist options
  • Save gilsondev/1392099 to your computer and use it in GitHub Desktop.
Save gilsondev/1392099 to your computer and use it in GitHub Desktop.
Teste unitario simples para uma view
# -*- coding: utf8 -*-
from django.test import TestCase
class DiagnosticosViewsTest(TestCase):
"""Testes feitos para verificar o funcionamento
do view de diagnósticos.
"""
def test_diagnostico_list_success(self):
response = self.client.get('/mobile/diagnosticos')
self.assertEquals(200, response.status_code)
self.assertTemplateUsed(response, 'diagnosticos/diagnosticos_list.html')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment