From 9e6175f70e8e603dc7c7ad52915e7126ebd6a571 Mon Sep 17 00:00:00 2001 From: joao camilo Date: Thu, 21 Nov 2024 18:20:47 -0400 Subject: [PATCH] bomba --- app.py | 11 +++++++++++ requirements.txt | 9 +++++++++ test.py | 15 +++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 app.py create mode 100644 requirements.txt create mode 100644 test.py diff --git a/app.py b/app.py new file mode 100644 index 0000000..b0154bd --- /dev/null +++ b/app.py @@ -0,0 +1,11 @@ +from flask import Flask + +app = Flask(__name__) +app.config['TESTING'] = True + +@app.route("/") +def hello_world(): + return "

Hello, !

" + +if __name__ == "__main__": + app.run(debug=True) \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..a43b5f6 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,9 @@ +blinker==1.9.0 +click==8.1.7 +Flask==3.1.0 +itsdangerous==2.2.0 +Jinja2==3.1.4 +MarkupSafe==3.0.2 +setuptools==75.1.0 +Werkzeug==3.1.3 +wheel==0.44.0 diff --git a/test.py b/test.py new file mode 100644 index 0000000..837c024 --- /dev/null +++ b/test.py @@ -0,0 +1,15 @@ +import unittest +from app import app + +class TestHelloWorld(unittest.TestCase): + + def setUp(self): + self.client = app.test_client() + + def test_hello_world(self): + response = self.client.get('/') + self.assertEqual(response.status_code, 200) + self.assertIn(b'Hello, World!', response.data) + +if __name__ == '__main__': + unittest.main() \ No newline at end of file