MCPcopy Create free account
hub / github.com/grapeot/devin.cursorrules / setUpClass

Method setUpClass

tests/test_web_scraper.py:16–25  ·  view source on GitHub ↗

Set up any necessary test fixtures.

(cls)

Source from the content-addressed store, hash-verified

14class 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."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected