Skip to main content
Glama
test_basic.py•1.4 kB
""" Basic tests to verify pytest setup is working correctly. """ import pytest import asyncio import json @pytest.mark.unit def test_pytest_setup(): """Test that pytest is configured correctly.""" assert True @pytest.mark.unit def test_json_handling(): """Test JSON handling utilities.""" test_data = {"test": "value", "number": 42} json_string = json.dumps(test_data) parsed_data = json.loads(json_string) assert parsed_data == test_data @pytest.mark.asyncio async def test_async_functionality(): """Test that async tests work correctly.""" await asyncio.sleep(0.001) # Minimal async operation assert True @pytest.mark.unit def test_mock_framework(mocker): """Test that pytest-mock is working.""" mock_func = mocker.MagicMock() mock_func.return_value = "mocked" result = mock_func() assert result == "mocked" mock_func.assert_called_once() class TestPytestFeatures: """Test class to verify pytest class-based test discovery.""" @pytest.mark.unit def test_class_based_test(self): """Test that class-based tests are discovered.""" assert True @pytest.mark.unit def test_fixtures(self, mock_context): """Test that custom fixtures work.""" assert mock_context is not None mock_context.info.assert_not_called() # Should be callable but not called yet

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Nexus-Digital-Automations/crawl4ai-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server