Skip to content

Commit 6d9cf74

Browse files
author
thenamesweretakenalready
committed
💚 Add user_agent to the test scheme
1 parent 68078f6 commit 6d9cf74

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_main.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ async def test_main():
111111
except Exception as e:
112112
errors.append({"Error in": "safe_mode", "Error": e})
113113

114+
"""Testing for errors in user agent"""
115+
try:
116+
await j.get_joke(user_agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Brave Chrome/91.0.4472.164 Safari/537.36")
117+
except Exception as e:
118+
errors.append({"Error in": "user agent", "Error": e})
119+
114120

115121
""" Testing jokeapi.submit_joke() """
116122
try:

0 commit comments

Comments
 (0)