Spaces:
Running
Running
Create conftest.py
Browse files- tests/conftest.py +27 -0
tests/conftest.py
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import pytest
|
| 2 |
+
import sys
|
| 3 |
+
import os
|
| 4 |
+
|
| 5 |
+
# Add src to path
|
| 6 |
+
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
|
| 7 |
+
|
| 8 |
+
@pytest.fixture
|
| 9 |
+
def sample_context():
|
| 10 |
+
"""Sample context for testing"""
|
| 11 |
+
return {
|
| 12 |
+
"songs": [
|
| 13 |
+
{"title": "Test Song 1", "artist": "Test Artist 1", "genre": "Pop", "plays": 100},
|
| 14 |
+
{"title": "Test Song 2", "artist": "Test Artist 2", "genre": "Rock", "plays": 200}
|
| 15 |
+
],
|
| 16 |
+
"artists": [
|
| 17 |
+
{"name": "Test Artist 1", "genre": "Pop", "followers": 1000, "verified": True},
|
| 18 |
+
{"name": "Test Artist 2", "genre": "Rock", "followers": 2000, "verified": False}
|
| 19 |
+
],
|
| 20 |
+
"stats": {
|
| 21 |
+
"song_count": 15000,
|
| 22 |
+
"artist_count": 800,
|
| 23 |
+
"user_count": 28000,
|
| 24 |
+
"playlist_count": 5000
|
| 25 |
+
},
|
| 26 |
+
"summary": "Test platform summary"
|
| 27 |
+
}
|