Created
January 9, 2021 09:04
-
-
Save mrrizal/6f79b7de5ce278edebb0c0240768bf45 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from hello import Hello | |
def test_greeting(): | |
hello_obj = Hello() | |
assert hello_obj.greeting("Rizal") == "Hello Rizal!" | |
def test_location(): | |
hello_obj = Hello() | |
status_code, response = hello_obj.get_location() | |
assert status_code == 200 | |
assert isinstance(response, dict) | |
for field in ['ip', 'city', 'region', 'country', 'loc', 'org', 'timezone', 'readme']: | |
assert field in response |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment