I am relatively inexperienced in the field of Python. I am working with Python Requets and BeautifulSoup. The scripts I write with it are all executable.
Since I don't know anything about Pytest and Unittest, I tried to acquire this knowledge, but I just can't get any further.
I've seen in particular that Python Requests works over Mocks, but I have to say, I'm not sure this is the right way to write tests and include them in a Jenkins pipeline. The goal is to test different http requests of a website, either as a unit test or via Pytest.
What is your opinion?
Is that also possible with Python requests (integration) via mocks?
Do I have to use Pytest or Unittesting?
import requests
from requests.exceptions import HTTPError
import pytest
from bs4 import BeautifulSoup
import postpython
page = requests.get('http://google.de')
soup = BeautifulSoup(page.content, 'html.parser')
print(soup)