Skip to content

Commit

Permalink
Lbxd scraper converted into a pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
cern1710 committed Aug 28, 2024
1 parent c79ae58 commit 10309f5
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions backend/tests/test_lbxd_scraper.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
import pytest
import sys
import os
import asyncio

sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from utils import *

if __name__ == "__main__":
movies = [{'film_slug':'inland-empire'}, {'film_slug':'satantango'},
{'film_slug':'sicily'}]
info = asyncio.run(scrape_movies(movies))
print(info)
@pytest.mark.asyncio
async def test_scrape_movies():
username = "mscorsese"
expected_info = [
{
'film_slug': 'yeelen',
'title': 'yeelen',
},
]
user_ratings = await scrape_user_ratings(username)
info = await scrape_movies(user_ratings, username=username)

0 comments on commit 10309f5

Please sign in to comment.