Permalink
Browse files

refactoring panel view tests

  • Loading branch information...
1 parent 2132740 commit 83ac4584d77f5d282f6c7be4f7bee78de312f9ea @andrewsmedina committed Jul 30, 2011
Showing with 5 additions and 4 deletions.
  1. +5 −4 startdust_website/panel/tests.py
@@ -5,11 +5,12 @@
class IndexViewTestCase(TestCase):
+ def setUp(self):
+ request = RequestFactory().get('/')
+ self.response = IndexView.as_view()(request)
+
def test_index_view_should_render_base_dot_html(self):
'''
index view should render panel/base.html
'''
- request = RequestFactory().get('/')
- response = IndexView.as_view()(request)
-
- self.assertIn('panel/base.html', response.template_name)
+ self.assertIn('panel/base.html', self.response.template_name)

0 comments on commit 83ac458

Please sign in to comment.