Spaces:
Build error
Build error
Download test_workflow.py from faizee07/instagram-autoposter: direct link, hf CLI and curl.
- Browser
- Download file 627 Bytes
-
https://huggingface.co/spaces/faizee07/instagram-autoposter/resolve/main/test_workflow.py
- Command line
-
hf download hf://spaces/faizee07/instagram-autoposter/test_workflow.py
-
curl -L -o test_workflow.py https://huggingface.co/spaces/faizee07/instagram-autoposter/resolve/main/test_workflow.py
627 Bytes
| import pytest | |
| from workflows.content_generator import generate_instagram_content | |
| from config.schemas import InstagramPost | |
| def test_content_generation(): | |
| """Test content generation""" | |
| test_entry = { | |
| "title": "Test Article", | |
| "content": "This is a test article about AI and technology.", | |
| "entry_id": "test123" | |
| } | |
| result = generate_instagram_content(test_entry) | |
| # Validate structure | |
| assert "caption" in result | |
| assert "hashtags" in result | |
| assert "image_prompt" in result | |
| assert len(result["hashtags"]) >= 3 | |
| if __name__ == "__main__": | |
| pytest.main([__file__]) |