Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

just testing #26

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/fast.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@app.get('/')
def root():
response = {
'greeting': 'Servus, griaß di!', # This is a typical Bavarian greeting ;)
'greeting': 'Hello Lisbon!',
'timestamp': datetime.now()
}

Expand Down
4 changes: 2 additions & 2 deletions tests/test_api_root.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

class TestApiRoot(unittest.TestCase):
def test_api_root(self):
# Adding a 15s sleep timer to ensure
# Adding a 15s sleep timer to ensure
# that the container has time to start up
time.sleep(15)

# Call API and assign to a variable
url = 'http://localhost:8080'
result = requests.get(url).json()

self.assertEqual(result['greeting'], 'Servus, griaß di!')
self.assertEqual(result['greeting'], 'Hello Lisbon!')