Skip to content

Commit

Permalink
Add main block to prevent fetch_url execution during unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aviolaris committed Oct 12, 2024
1 parent ae10c2b commit 9ab4452
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/healthcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ def fetch_url(url):
sys.exit(1)


fetch_url('http://localhost:5000')
if __name__ == "__main__":
fetch_url('http://localhost:5000')

0 comments on commit 9ab4452

Please sign in to comment.