fix: Update import paths to use 'apps' prefix for models and services

This commit is contained in:
pacnpal
2025-09-28 10:50:57 -04:00
parent 1b246eeaa4
commit bf04e4d854
6 changed files with 395 additions and 363 deletions

View File

@@ -46,7 +46,7 @@ def test_trigger_endpoint(token):
"Content-Type": "application/json"
}
print(f"\n🚀 Testing manual trigger endpoint...")
print("\n🚀 Testing manual trigger endpoint...")
print(f"URL: {trigger_url}")
response = requests.post(trigger_url, headers=headers)
@@ -72,7 +72,7 @@ def test_trigger_endpoint(token):
def test_trending_endpoints():
"""Test the trending content endpoints to see the results."""
print(f"\n📊 Testing trending content endpoints...")
print("\n📊 Testing trending content endpoints...")
# Test trending content endpoint
trending_url = f"{BASE_URL}/api/v1/trending/content/"
@@ -109,7 +109,7 @@ def test_trending_endpoints():
# Show the newly_opened structure to verify our changes
if data.get('newly_opened'):
print(f"\n🎢 First newly opened item structure:")
print("\n🎢 First newly opened item structure:")
first_item = data['newly_opened'][0]
print(f" Name: {first_item.get('name')}")
# Should be park name, not location
@@ -124,12 +124,12 @@ def test_trending_endpoints():
print(
f" ❌ ERROR: 'location' field still present: {first_item['location']}")
else:
print(f" ✅ SUCCESS: 'location' field removed as requested")
print(" ✅ SUCCESS: 'location' field removed as requested")
def test_unauthorized_access():
"""Test that non-admin users cannot access the trigger endpoint."""
print(f"\n🔒 Testing unauthorized access...")
print("\n🔒 Testing unauthorized access...")
trigger_url = f"{BASE_URL}/api/v1/trending/calculate/"
@@ -169,7 +169,7 @@ def main():
trigger_result = test_trigger_endpoint(token)
if trigger_result:
print(f"\n⏳ Waiting 10 seconds for tasks to process...")
print("\n⏳ Waiting 10 seconds for tasks to process...")
time.sleep(10)
# Test the trending endpoints to see results