Skip to content

and weather.api - #1

Open
pufffikk wants to merge 1 commit into
mainfrom
develop
Open

and weather.api#1
pufffikk wants to merge 1 commit into
mainfrom
develop

Conversation

@pufffikk

Copy link
Copy Markdown
Owner
  1. Write a Function to Make an API Call:

You have a Python module called weather.py that includes a function get_weather() that fetches weather data from a hypothetical API. Tip: To make api calls in Python. Check how to use the "requests" library in python.

  1. Write Tests and Mock the API Call:

Create a test file called test_weather.py. In this file, you’ll the "requests.get" function so that no real HTTP request is made.
Tip: Learn how to use unittest.mock and patch. A link has been attached for your reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants