
from nose.tools import istest

from .. import test_app


class MainViewTestCase(test_app.SWHViewTestCase):
    render_template = False

    @istest
    def homepage(self):
        # when
        rv = self.client.get('/')

        # then
        self.assertEquals(rv.status_code, 302)
        self.assertRedirects(rv, '/api/')

    @istest
    def info(self):
        # when
        rv = self.client.get('/about/')

        self.assertEquals(rv.status_code, 200)
        self.assert_template_used('about.html')
        self.assertIn(b'About', rv.data)


from nose.tools import istest

from .. import test_app


class MainViewTestCase(test_app.SWHViewTestCase):
    render_template = False

    @istest
    def homepage(self):
        # when
        rv = self.client.get('/')

        # then
        self.assertEquals(rv.status_code, 302)
        self.assertRedirects(rv, '/api/')

    # @istest
    # def info(self):
    #     # when
    #     rv = self.client.get('/about/')

    #     self.assertEquals(rv.status_code, 200)
    #     self.assert_template_used('about.html')
    #     self.assertIn(b'About', rv.data)

Comment out test on /about/
api: Comment out test on /about/

Related fb0bf65356aa6a6fd6cfb6e29122e1f45925d21c

  
  from nose.tools import istest
  
  from .. import test_app
  
  
  class MainViewTestCase(test_app.SWHViewTestCase):
      render_template = False
  
      @istest
      def homepage(self):
          # when
          rv = self.client.get('/')
  
          # then
          self.assertEquals(rv.status_code, 302)
          self.assertRedirects(rv, '/api/')
  
-     @istest
+     # @istest
-     def info(self):
+     # def info(self):
-         # when
+     #     # when
-         rv = self.client.get('/about/')
+     #     rv = self.client.get('/about/')
  
-         self.assertEquals(rv.status_code, 200)
+     #     self.assertEquals(rv.status_code, 200)
-         self.assert_template_used('about.html')
+     #     self.assert_template_used('about.html')
-         self.assertIn(b'About', rv.data)
+     #     self.assertIn(b'About', rv.data)
  
Comment out test on /about/
## Code Before:

from nose.tools import istest

from .. import test_app


class MainViewTestCase(test_app.SWHViewTestCase):
    render_template = False

    @istest
    def homepage(self):
        # when
        rv = self.client.get('/')

        # then
        self.assertEquals(rv.status_code, 302)
        self.assertRedirects(rv, '/api/')

    @istest
    def info(self):
        # when
        rv = self.client.get('/about/')

        self.assertEquals(rv.status_code, 200)
        self.assert_template_used('about.html')
        self.assertIn(b'About', rv.data)

## Instruction:
Comment out test on /about/
## Code After:

from nose.tools import istest

from .. import test_app


class MainViewTestCase(test_app.SWHViewTestCase):
    render_template = False

    @istest
    def homepage(self):
        # when
        rv = self.client.get('/')

        # then
        self.assertEquals(rv.status_code, 302)
        self.assertRedirects(rv, '/api/')

    # @istest
    # def info(self):
    #     # when
    #     rv = self.client.get('/about/')

    #     self.assertEquals(rv.status_code, 200)
    #     self.assert_template_used('about.html')
    #     self.assertIn(b'About', rv.data)
