为什么我的Flask应用程序出现断言错误,即使路由正确

I have a simple Flask application which has some routes and uses a local sqlite database. I am trying to test the very first route and even though it loads perfectly and gives 200 on curl requests, for testing it gives 404.

路由的定义如下:

@app.route("/")
def hello():
    return flask.send_file('index.html')

The __main__ looks like this:

if __name__ == "__main__":
    db_name = 'original.db'
    Database(db_name)

    print("Hosting on port 8888")
    app.run(debug=True, port=8888)

我的UnitTest类如下所示:

class UnitTests(TestCase):

    def setUp(self):
        self.app = Flask(__name__, static_url_path='')
        database.Database('test.db')
        self.client = self.app.test_client()

    def test_hello(self):
        response = self.client.get('/', follow_redirects=True)
        assert response.status_code == 200


if __name__ == '__main__':
    unittest.main()

但是它给出了404的断言,我无法理解原因。我是Flask的新手。我尝试从答案中找到一些类似问题的帖子,但是它们没有用。我将不胜感激任何帮助。