Created
July 24, 2013 22:48
-
-
Save vbabiy/6075345 to your computer and use it in GitHub Desktop.
Working extract method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TestHome(TestCase): | |
def test_home_template_used(self): | |
res = self.get_name() | |
self.assertTemplateUsed(res, 'home.html') | |
def get_name(self): | |
res = self.client.get('/') | |
return res | |
def test_home_template_contains_hello_world(self): | |
res = self.get_name() | |
self.assertContains(res, 'Hello World') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TestHome(TestCase): | |
def test_home_template_used(self): | |
res = self.client.get('/') | |
self.assertTemplateUsed(res, 'home.html') | |
def test_home_template_contains_hello_world(self): | |
res = self.client.get('/') | |
self.assertContains(res, 'Hello World') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment