Skip to content

Commit

Permalink
test deploy farm service not on Github
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin op iMac committed Oct 31, 2023
1 parent d7d6834 commit e96cefe
Showing 1 changed file with 11 additions and 22 deletions.
33 changes: 11 additions & 22 deletions tests/test_main.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
# Import what we need for testing
import unittest
from main import app

class TestApp(unittest.TestCase):

def test_index(self):
# Create a test client using the Flask app context
with app.test_client() as client:
# Make a GET request to the index route
response = client.get('/')
# Check that the response status code is 200 OK
self.assertEqual(response.status_code, 200)

def test_cow(self):
# Create a test client using the Flask app context
with app.test_client() as client:
# Make a GET request to the cow route
response = client.get('/cow')
# Check that the response status code is 200 OK
self.assertEqual(response.status_code, 200)
# Check that the response data is the expected string
# self.assertEqual(response.data.decode('utf-8'), 'MOoooOo!')
def add_numbers(a, b):
return a + b


def main():
result = add_numbers(2, 3)
print(result)


if __name__ == '__main__':
main()

0 comments on commit e96cefe

Please sign in to comment.