Set up any necessary test fixtures.
(cls)
| 14 | class TestWebScraper(unittest.TestCase): |
| 15 | @classmethod |
| 16 | def setUpClass(cls): |
| 17 | """Set up any necessary test fixtures.""" |
| 18 | cls.mock_response = MagicMock() |
| 19 | cls.mock_response.status = 200 |
| 20 | cls.mock_response.text.return_value = "Test content" |
| 21 | |
| 22 | cls.mock_client_session = MagicMock() |
| 23 | cls.mock_client_session.__aenter__.return_value = cls.mock_client_session |
| 24 | cls.mock_client_session.__aexit__.return_value = None |
| 25 | cls.mock_client_session.get.return_value.__aenter__.return_value = cls.mock_response |
| 26 | |
| 27 | def setUp(self): |
| 28 | """Set up test fixtures before each test method.""" |
nothing calls this directly
no outgoing calls
no test coverage detected