from json import loads
from os import close, unlink
from tempfile import mkstemp
from unittest import TestCase
from cunhajacaiu import app


class FlaskTestCase(TestCase):

    def setUp(self):

        # set a test db
        self.db_handler, self.db_path = mkstemp()
        app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + self.db_path

        # set a testing app
        app.config['TESTING'] = True
        app.config['REQUESTS_CACHE_BACKEND'] = 'memory'
        self.app = app.test_client()

    def tearDown(self):
        close(self.db_handler)
        unlink(self.db_path)


class MockJsonNewsResponse:

    @staticmethod
    def json():
        with open('tests/news.json') as file_handler:
            return loads(file_handler.read())

    @property
    def status_code(self):
        return 200

@@ -613,16 +613,65 @@
 ponse:%0A%0A
+    HTTP_STATUS_CODE = (500, 200)%0A    COUNT = 0%0A%0A
     @sta
@@ -850,15 +850,73 @@
     
-return 200
+self.COUNT += 1%0A        return self.HTTP_STATUS_CODE%5Bself.COUNT - 1%5D
 %0A

Test the only untested line