Skip to content

Instantly share code, notes, and snippets.

@xiantail
Created December 31, 2015 07:01
Show Gist options
  • Save xiantail/3e56e178cba3344e7390 to your computer and use it in GitHub Desktop.
Save xiantail/3e56e178cba3344e7390 to your computer and use it in GitHub Desktop.
TDD with Python / Chapter 3
from django.core.urlresolvers import resolve
from django.test import TestCase
from lists.views import home_page #1
class HomePageTest(TestCase):
def test_root_url_solves_to_home_page_view(self):
found = resolve('/') #2
self.assertEqual(found.func, home_page) #3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment