Saturday, January 15, 2011

TestCase.urls with templates that have url to other apps

 
class EmailNotificationTest(BaseTestCase):
    """
    Test Class for testing email notification
    """
    urls = 'notification.urls'

 
    def test_create_notification(self):
        res = self.client.get('email/create/) # will fail 
        self.assertEquals(res.status_code, 200)

If I try to render a template that has {% url other-app-view %} I get a error. I am doing something wrong or is this by design?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate