

from tests.test_utils import ECDTestCase


class IndexTestCase(ECDTestCase):
    """Class to test index related views.
    """
    
    def testIndexView(self):
        """Tests the index view.
        """
        
        #url = self.getUrl(url_names.SITE_INDEX)
        url = '/'
        response = self.get(url)
        self.assertResponseOK(response)

from e_cidadania import url_names

from tests.test_utils import ECDTestCase


class IndexTestCase(ECDTestCase):   
    """Class to test index related views.
    """
    
    def testIndexView(self):
        """Tests the index view.
        """
        
        response = self.get(url_name=url_names.SITE_INDEX)
        self.assertResponseOK(response)
    
    def testIndexEntriesFeed(self):
        """Tests the index entries feed view.
        """
        
        response = self.get(url_name=url_names.SITE_FEED)
        self.assertResponseOK(response)
Add tests for core.views.index.py. The tests presently test only if the corresponding urls can be accessed.
Add tests for core.views.index.py. The tests presently test only if the corresponding urls can be accessed.

  
+ from e_cidadania import url_names
  
  from tests.test_utils import ECDTestCase
  
  
- class IndexTestCase(ECDTestCase):
+ class IndexTestCase(ECDTestCase):   
      """Class to test index related views.
      """
      
      def testIndexView(self):
          """Tests the index view.
          """
          
-         #url = self.getUrl(url_names.SITE_INDEX)
+         response = self.get(url_name=url_names.SITE_INDEX)
-         url = '/'
-         response = self.get(url)
          self.assertResponseOK(response)
+     
+     def testIndexEntriesFeed(self):
+         """Tests the index entries feed view.
+         """
+         
+         response = self.get(url_name=url_names.SITE_FEED)
+         self.assertResponseOK(response)
Add tests for core.views.index.py. The tests presently test only if the corresponding urls can be accessed.
## Code Before:


from tests.test_utils import ECDTestCase


class IndexTestCase(ECDTestCase):
    """Class to test index related views.
    """
    
    def testIndexView(self):
        """Tests the index view.
        """
        
        #url = self.getUrl(url_names.SITE_INDEX)
        url = '/'
        response = self.get(url)
        self.assertResponseOK(response)
## Instruction:
Add tests for core.views.index.py. The tests presently test only if the corresponding urls can be accessed.
## Code After:

from e_cidadania import url_names

from tests.test_utils import ECDTestCase


class IndexTestCase(ECDTestCase):   
    """Class to test index related views.
    """
    
    def testIndexView(self):
        """Tests the index view.
        """
        
        response = self.get(url_name=url_names.SITE_INDEX)
        self.assertResponseOK(response)
    
    def testIndexEntriesFeed(self):
        """Tests the index entries feed view.
        """
        
        response = self.get(url_name=url_names.SITE_FEED)
        self.assertResponseOK(response)