This repository has been archived on 2022-08-24. You can view files and clone it, but cannot push or open issues or pull requests.
ergast-py/tests/test_requester.py

16 lines
464 B
Python
Raw Normal View History

2022-06-01 19:31:06 +02:00
import ergast_py
import pytest
class TestRequester():
"""
Tests for the Requester class
"""
r = ergast_py.Requester()
def test_run_request(self):
self.r.run_request(season=2008, round=5, criteria=["drivers", "alonso"], resource="driverStandings")
def test_run_request_fails(self):
with pytest.raises(Exception):
self.r.run_request(season=2008, round=5, criteria=["drivers", "alonso"], resource="bad request")